"Kevin M. Wilson" writes:
> Ok, I'm not finding any info. on the int() for converting a str to an
> int (that specifies a base parameter)?!
https://docs.python.org/3/library/functions.html#int
> The picture is of the code I've written...
I don't see a picture. The mailing list probably does no
On 2023-05-25, Kevin M. Wilson via Python-list wrote:
> Ok, I'm not finding any info. on the int() for converting a str to
> an int (that specifies a base parameter)?!
Where are you looking?
https://docs.python.org/3/library/functions.html#int
> The picture is of the code I've written... And
On 2023-05-25 22:30, Kevin M. Wilson via Python-list wrote:
Ok, I'm not finding any info. on the int() for converting a str to an int (that specifies
a base parameter)?! The picture is of the code I've written... And the base 10 paradigm
involved?? years = int('y') # store for calculationValueE
On Fri, 26 May 2023 at 10:26, Kevin M. Wilson via Python-list
wrote:
>
> Ok, I'm not finding any info. on the int() for converting a str to an int
> (that specifies a base parameter)?! The picture is of the code I've
> written... And the base 10 paradigm involved?? years = int('y') # store for
Ok, I'm not finding any info. on the int() for converting a str to an int (that
specifies a base parameter)?! The picture is of the code I've written... And
the base 10 paradigm involved?? years = int('y') # store for calculation
ValueError: invalid literal for int() with base 10: 'y'
What is me
On Fri, 26 May 2023 at 09:58, Kevin M. Wilson via Python-list
wrote:
>
> So, why can't a string of an integer be converted to an integer, via
> print(int(str('23.5')))???
23.5 is not an integer, so "23.5" is not the string of an integer.
ChrisA
--
https://mail.python.org/mailman/listinfo/pytho
We can first convert the string representation of float into float using
float() function and then convert it into an integer using int().So, why can't
a string of an integer be converted to an integer, via
print(int(str('23.5')))???
Perplexed
| print(int(float('23.5'))) |
"When you pas
Ok, I'm not finding any info. on the int() for converting a str to an int (that
specifies a base parameter)?! The picture is of the code I've written... And
the base 10 paradigm involved?? years = int('y') # store for
calculationValueError: invalid literal for int() with base 10: 'y'What is mean
On 2023-05-25 16:53, Eryk Sun wrote:
On 5/25/23, BlindAnagram wrote:
vcx_path = 'C:\\build.vs22\\lib\\lib.vcxproj'
src_path = 'C:\\lib\\src\\'
rel_path = '..\\..\\..\\lib\\src'
[snip]
The first of these three results produces an incorrect relative path
because relpath does not strip off any
On 25/05/23 7:49 pm, BlindAnagram wrote:
The first of these three results produces an incorrect relative path
because relpath does not strip off any non-directory tails before
comparing paths.
It has no way of knowing whether a pathname component is a directory
or not. It's purely an operation
On 5/25/23, BlindAnagram wrote:
>
> vcx_path = 'C:\\build.vs22\\lib\\lib.vcxproj'
> src_path = 'C:\\lib\\src\\'
> rel_path = '..\\..\\..\\lib\\src'
>
> [snip]
>
> The first of these three results produces an incorrect relative path
> because relpath does not strip off any non-directory tails befor
I am wondering whether I have misunderstood the semantics of os.path
relpath or whether it has a bug.
Here is a short test program:
---
from os.path import relpath, split
src_path = 'C:\\lib\\src\\'
vcx_path = 'C:\\build.vs22\\lib\\li
On 25/05/2023 12:23, Robin Becker wrote:
On 22/05/2023 22:04, Thomas Wouters wrote:
> I'm pleased to announce the release of Python 3.12 beta 1 (and feature
> freeze for Python 3.12).
>
...
I see a major difference between 3.12.0a7 and 3.12.0b1
Basically in preppy an importer is defined t
On 22/05/2023 22:04, Thomas Wouters wrote:
> I'm pleased to announce the release of Python 3.12 beta 1 (and feature
> freeze for Python 3.12).
>
...
I see a major difference between 3.12.0a7 and 3.12.0b1
Basically in preppy an importer is defined to handle imports of '.prep' files.
This work
On 24/05/2023 15:37, A KR wrote:
It is perfectly explained in the standards here [1] saying that:
In order to avoid infinite recursion in this method, its implementation should
always call the base class method with the same name to access any attributes
it needs, for example, object.__getatt
15 matches
Mail list logo