Re: self self self
Posted: Feb 25, 2007 12:42 PM
> > self It self seems self like self you self are self
> > self "self" self alot.
> Agreed! I wish we had conventionalized
> instead of
self. Seems too late now.
> Better yet would be to enable
self to be
> implicit so any
.foo would actually be
self.foo. (Please don't tell me to
I have to agree with this as well. I have a couple other ones:
1. The pace with which things change. Sometimes it's slow, sometimes the changes seem very big. The one I'm thinking of particularly is the addition of list comprehensions. These were a pretty big change for me and it took me a while to actually see what they were about. Now that I understand them I think they are fantastic. I won't go so far as to say that I look for excuses to code them, but they sure do come in pretty damn handy. And they are nice and compact, too.
2. Related to list comprehensions, some of the examples available in the documentation are terrible. They are worse than useless because they show nothing of some of the more useful features. Again, list comprehensions is my most recent example of this. The filters for them are very useful, but the docs don't show any good examples of that at all. A real simple one would be all the odd numbers and the number times 2 up to 20.
[[x, 2*x] for x in range(20) if x % 2]
The filter is one of the most powerful features of the comprehension but I can't find one single good example in the standard python docs.
3. This is kind of stupid, but the ':' at the end of certain statements seems unnecessary to me. Indentation controls scope so why do we need to type
for x in range(10):
that being said, I'll still work in python whenever I get the chance.