A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-January/059834.html below:

[Python-Dev] str with base

[Python-Dev] str with base [Python-Dev] str with baseFredrik Lundh fredrik at pythonware.com
Tue Jan 17 17:27:38 CET 2006
skip at pobox.com wrote:

>    Skip> A shortcoming in int() hardly seems like a good reason to mess
>    Skip> with str().
>
>    Gareth> How's it a shortcoming in int() that it doesn't do anything
>    Gareth> with, say, int(2.345,19)?
>
> My reasoning was that just because int() was written to ignore the second
> arg depending on type (the "shortcoming") doesn't mean that str() should as
> well.

"ignore" is perhaps the wrong word:

>>> int(1.0, 1)
Traceback (most recent call last):
  File "<stdin>", line 1, in ?
TypeError: int() can't convert non-string with explicit base

</F> 



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4