Python dynamic attribute creation

Bruno Desthuilliers bruno.42.desthuilliers at websiteburo.invalid
Thu Jul 1 08:41:48 EDT 2010


Stephen Hansen a écrit :
> On 6/30/10 10:37 PM, Aahz wrote:
>> In article<4c29ad38$0$26210$426a74cc at news.free.fr>,
>> Bruno Desthuilliers<bruno.42.desthuilliers at websiteburo.invalid>  wrote:
>>> Aahz a écrit :
>>>> In article<4c285e7c$0$17371$426a74cc at news.free.fr>,
>>>> Bruno Desthuilliers<bruno.42.desthuilliers at websiteburo.invalid>  wrote:
>>>>> Aahz a écrit :
>>>>>> In article<4c2747c1$0$4545$426a74cc at news.free.fr>,
>>>>>> Bruno Desthuilliers<bdesth.quelquechose at free.quelquepart.fr>  wrote:
>>>>>>>
>>>>>>> Python has no pretention at "elegance".
>>>>>> That's not true at all.  More precisely, I would agree with you if 
>>>>>> the
>>>>>> emphasis is on "pretention" but not if the emphasis is on elegance;
>>>>> Python Zen, #9 (or #8 if you're a TrueHacker !-))
>>>>
>>>> ...and this implies that Python has no focus on elegance because...?
>>>
>>> Nope, that was an answer about where the emphasis was in my previous
>>> statement. I don't mean Python don't care about or is devoid of
>>> elegance, just that it's not the primary concern - hence the "has no
>>> pretention at" part.
>>
>> It may not be "the" primary concern, but elegance certainly is *a*
>> primary concern.
> 
> I concur.
> 
> Its not explicitly stated, but it is the Zen 0. This is further 
> supported by its implied presence in many of the Axioms and Truths of 
> the Bots.
> 
> "Beautiful is better then ugly"; and then the praise of the explicit, of 
> simplicity, of readability.
> 
> Elegance is a prime concern of Python, as it is the natural result of 
> the Doctrines of Pythonicity. It may not be stated as a rule, but it a 
> the reward that we are given for following the path of enlightenment.
> 

"Elegance" (just like "beauty") is in the eyes of the beholder.

Explicitness, simplicity and readability are indeed primary concerns in 
Python's design, but "elegance" is not. Now you'll of course find Python 
mostly elegant  *if* you value expliciteness, simplicity and 
readability, but that's only because your definition of "elegant" 
happens to match Guido's.

But please gentlemen, let's not fight on this. This no religion, there's 
no dogma here, and no heretic to burn.





More information about the Python-list mailing list