[issue33574] Conversion of Number to String(str(number))

2018-05-19 Thread Steven D'Aprano
Steven D'Aprano added the comment: Also note that shadowing builtins *deliberately* is a powerful and useful technique used for advanced programming. -- nosy: +steven.daprano ___ Python tracker _

[issue33574] Conversion of Number to String(str(number))

2018-05-18 Thread Eric V. Smith
Eric V. Smith added the comment: The way to avoid this problem is to not assign to str. You should not shadow python builtins that you want to continue using. -- nosy: +eric.smith resolution: -> not a bug stage: -> resolved status: open -> closed type: compile error -> crash ___

[issue33574] Conversion of Number to String(str(number))

2018-05-18 Thread Khalid Moh'd.
New submission from Khalid Moh'd. : Consider conversion of an integer to string: a=5 #number str #outputs 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 parent