This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author cajetan.rodrigues
Recipients Dominik V., cajetan.rodrigues, docs@python
Date 2020-04-20.20:00:13
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <[email protected]>
In-reply-to
Content
> these interpret the number as decimal

I'm no linguist, but I feel both expressions in the subordinate clause have their purposes, with respect to the the main clause:

* `int('0144') == 144` to show what works
* `int('0x144')` to show what does not work

I don't believe the octal notation was meant in the first example, as the equality wouldn't then hold, even if somehow the typecast worked (which it doesn't). The point was to positively reinforce the idea that the content of the string would be interpreted as a decimal. So something like `int('000000144') == 144` would still hold True. Negative reinforcement is provided in the second example.

But I agree that the sentence itself does not clearly separate the two examples, so I would suggest adding a comma after the first example, like so:

> By default, these interpret the number as decimal, so that `int('0144') == 144`, and `int('0x144')` raises ValueError.
History
Date User Action Args
2020-04-20 20:00:13cajetan.rodriguessetrecipients: + cajetan.rodrigues, docs@python, Dominik V.
2020-04-20 20:00:13cajetan.rodriguessetmessageid: <[email protected]>
2020-04-20 20:00:13cajetan.rodrigueslinkissue40340 messages
2020-04-20 20:00:13cajetan.rodriguescreate