Forgetting "()" when calling methods
Brian Quinlan
brian at sweetapp.com
Fri Apr 25 22:39:30 EDT 2003
More information about the Python-list mailing list
Fri Apr 25 22:39:30 EDT 2003
- Previous message (by thread): Forgetting "()" when calling methods
- Next message (by thread): Forgetting "()" when calling methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Erik Max Francis wrote:
> One thing that PyChecker, at least, is more likely to catch is "code
has
> no effect" statements like
>
> sys.exit
How do you know that the code has no effect?
> Without the parentheses, this clearly can't do anything useful,
class Sys:
def __getattr__(self, attr):
if attr == 'exit'
print 'cya'
sys = Sys()
- Previous message (by thread): Forgetting "()" when calling methods
- Next message (by thread): Forgetting "()" when calling methods
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list