Re: Chapter 9 Tutorial for Classes Not Working
- From: John Salerno <johnjsal@xxxxxxxxxxxxxxx>
- Date: Fri, 30 Jun 2006 17:39:08 GMT
tac-tics wrote:
x = MyClass
xf = x.f
while True:
print xf()
Python has some VERY nasty gotchas concerning parenthesis (or lack
there of).
Is this really a gotcha? I don't think you should blame Python for this mistake. Even a novice programmer like myself can intuitively understand that parentheses are needed.
And while this *is* something unique to Python (or maybe unique to dynamic languages in general?), the actual usage of parentheses is consistent with other programming languages, so Python or not, it should just make sense to write x = MyClass() instead of x = MyClass
.
- References:
- Chapter 9 Tutorial for Classes Not Working
- From: Tom Grove
- Re: Chapter 9 Tutorial for Classes Not Working
- From: tac-tics
- Chapter 9 Tutorial for Classes Not Working
- Prev by Date: Re: Regular Expression - old regex module vs. re module
- Next by Date: Re: sum fonction in gadfly
- Previous by thread: Re: Chapter 9 Tutorial for Classes Not Working
- Next by thread: Re: Chapter 9 Tutorial for Classes Not Working
- Index(es):
Relevant Pages
|