New submission from Khalid Moh'd. <khld....@gmail.com>: Consider conversion of an integer to string: a=5 #number str #outputs <class 'str'> str(a) #works perfectly and prints '5'
Now, consider: str="Hello World" #reads the string str #prints "Hello World" str(5) #gives an error Interpreter considers variable str before parenthesis not str from <class 'str'> There must be a way to distinguish user defined variable str and conversion operation str(). ---------- messages: 317049 nosy: Khalid Moh'd. priority: normal severity: normal status: open title: Conversion of Number to String(str(number)) type: compile error versions: Python 3.6 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33574> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com