Skip to content

(e)Book errata #2

Description

@gravityFlower

Somehow i couldn't find the errata link to the book, neither on Apress nor Springer, so i'm posting it here.
Maybe others will stumble upon it in search for answers (and/or maybe provide their findings).

Page 5 - Octal number literals: the book claims that octal number literals can be written as >>> 010. On execution, you will be presented with an SyntaxError: invalid token error.
PEP 3127 -- Integer Literal Support and Syntax from 2007-05-14 proposes that it should contain an additional o or O between the 0 and the octal number (similar to binary with 0b and hexadecimal with 0xprefix), therefore resulting in 0o10 or 0O10. This has been proposed for Python 3.0, and for backward compatibility, to Python 2.6.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions