Cheat sheet

Riccardo T. gr3yfox.fw at gmail.com
Fri Dec 28 06:40:50 EST 2007


Scott David Daniels ha scritto:
> [in the .png]
>> ...
>> Callable types
>>    ...
>>    User-definet methods
> 
> I personally prefer "User-defined methods"

That's a typo, thank you.


>>    ...
>>    Class instances
> I'd try:
>      Class instances with a __call__ method.

Yes, it's more clear now.


>> ...
>> Classes
>> Classes Instances
> 
> This probably wants to be
>   Class Instances

Whoops, I'm sorry :)


> "file" objects are generally supposed to be built with the
> open function, not instantiated as shown.

Since open() is just an alias for file(), changing the name should be
enough, right?


> Also note iterating on a file gets the lines.

What do you think about adding a line like this to the examples?

for line in open("filename","r"): pass #iterate over lines


> Do you know about seq[i:] and seq[::-1]?

Yes I know. I'll try to add them (together with seq[:] and seq[:j]).



Thank you very much indeed :)

--
GreyFox



More information about the Python-list mailing list