[issue38274] sementic errors?

Derbe Ejere report at bugs.python.org
Wed Sep 25 07:54:57 EDT 2019


New submission from Derbe Ejere <barataart2 at gmail.com>:

a = "hello"
b = "4.3" 

1.Both variables a  and b are type of object String (can be checked with type()
2.Change both to float using float(). 
variable a cannot be changed to float since it is str object. However,
variable b can be changed to float giving 4.3 eventhough it is also a str object. 

CONTRADICTION?!

Thanks,

Derbe Ejere

----------
messages: 353184
nosy: dejere
priority: normal
severity: normal
status: open
title: sementic errors?

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38274>
_______________________________________


More information about the Python-bugs-list mailing list