My python annoyances so far

Bruno Desthuilliers bruno.42.desthuilliers at wtf.websiteburo.oops.com
Fri Apr 27 06:52:15 EDT 2007


7stud a écrit :
> flifus at gmail.com wrote:
>> Annoyances:
>>
> 
> Every language has annoyances.  Python is no exception.  

Sure. But we may disagree on what are actually Python's annoyances !-)

> Post away.
> Anyone that is offended can go drink a Guinness.
> 
>> 1. Underscores! What's the deal with that? Especially those double
>> underscores. The best answer I read on this is that the double
>> underscores denotes special methods that the interpreter may
>> automatically use. For example, 4+4 get expanded by the interpreter to
>> 4.__add__(4).
>>
> 
> I thought those were pretty ugly myself.  Now, I am used to them.

FWIW, you shouldn't have to directly use __magic__ methods - or only in 
very special corner cases.




More information about the Python-list mailing list