[docs] Issue with python function names
ardavidbecker at gmail.com
Sat Feb 6 00:49:10 EST 2016
And of course the same thing happens if we use them for variable names as
>>> type = 2
Traceback (most recent call last):
File "<pyshell#74>", line 1, in <module>
TypeError: 'int' object is not callable
I feel there is no point in allowing them as they cannot be used. Users are
restricted to use the 32 keywords but we can't force them to remember all
built in function names and not to use them as variable or function names.
On Sat, Feb 6, 2016 at 11:11 AM, david becker <ardavidbecker at gmail.com>
> I have a query in using function names. Python allows users to write their
> own functions with built-in function names.
> def print():
> return "strange"
> print() -- Returns strange
> But the built in "print" function doesn't work any more till i restart the
> I personally feel users should not be allowed to use built in function
> names. Is there any special reason why python allows them?
> David Becker
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the docs