From: Aahz on
In article <4c29ad38$0$26210$426a74cc(a)news.free.fr>,
Bruno Desthuilliers <bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>Aahz a �crit :
>> In article <4c285e7c$0$17371$426a74cc(a)news.free.fr>,
>> Bruno Desthuilliers <bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>>> Aahz a �crit :
>>>> In article <4c2747c1$0$4545$426a74cc(a)news.free.fr>,
>>>> Bruno Desthuilliers <bdesth.quelquechose(a)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.
--
Aahz (aahz(a)pythoncraft.com) <*> http://www.pythoncraft.com/

"If you don't know what your program is supposed to do, you'd better not
start writing it." --Dijkstra
From: Stephen Hansen on
On 6/30/10 10:37 PM, Aahz wrote:
> In article<4c29ad38$0$26210$426a74cc(a)news.free.fr>,
> Bruno Desthuilliers<bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>> Aahz a �crit :
>>> In article<4c285e7c$0$17371$426a74cc(a)news.free.fr>,
>>> Bruno Desthuilliers<bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>>>> Aahz a �crit :
>>>>> In article<4c2747c1$0$4545$426a74cc(a)news.free.fr>,
>>>>> Bruno Desthuilliers<bdesth.quelquechose(a)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.

--

... Stephen Hansen
... Also: Ixokai
... Mail: me+list/python (AT) ixokai (DOT) io
... Blog: http://meh.ixokai.io/

P.S. Yes, my wording is intentionally silly-religious. Not meant to be
taken as anything but tongue-in-cheek.
From: Bruno Desthuilliers on
Stephen Hansen a �crit :
> On 6/30/10 10:37 PM, Aahz wrote:
>> In article<4c29ad38$0$26210$426a74cc(a)news.free.fr>,
>> Bruno Desthuilliers<bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>>> Aahz a �crit :
>>>> In article<4c285e7c$0$17371$426a74cc(a)news.free.fr>,
>>>> Bruno Desthuilliers<bruno.42.desthuilliers(a)websiteburo.invalid> wrote:
>>>>> Aahz a �crit :
>>>>>> In article<4c2747c1$0$4545$426a74cc(a)news.free.fr>,
>>>>>> Bruno Desthuilliers<bdesth.quelquechose(a)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.


From: WANG Cong on
On 06/30/10 01:25, Ethan Furman <ethan(a)stoneleaf.us> wrote:

>> But if so why setattr() still exists? What is it for if we can do the
>> same thing via assignments? Also, in order to be perfect, Python should
>> accept to add dynamic attributes dynamically, something like PEP
>> 363. That doesn't happen.
>
> Setattr and friends exist to work with dynamic attributes.
>

Yeah, my point is why setattr() for dynamic attributes while assignments
for static attributes? Why not unify them?

> "The Perfect Language" does not exist, and never will. I'm not even
> sure it could exist for a single person, let alone a group of people
> with disparate needs, patterns of thought, etc.
>

Agreed, but at least, the reason why I am being against so many people
here is also trying to make Python be more perfect with my
understanding.

Thanks!

--
Live like a child, think like the god.

From: WANG Cong on
On 06/30/10 01:20, Stephen Hansen <me+list/python(a)ixokai.io> wrote:

>> But if so why setattr() still exists? What is it for if we can do the
>> same thing via assignments? Also, in order to be perfect, Python should
>> accept to add dynamic attributes dynamically, something like PEP
>> 363. That doesn't happen.
>
> What does perfection have to do with anything? Python does not strive
> for perfection. More then that, it rejects the entire idea of
> perfection when it gets in the way of simply solving problems in an
> easy, clean, readable, and reliable way. "Practicality beats purity".
>


I don't quite understand the spirit behind. IMHO, being purity should
not harm the practicality, they are harmonious. :)

> PEP 363 proposes adding new syntax: for new syntax to be accepted into
> the language one must meet a *very* high bar. One must show a clear,
> compelling reason why this new mental burden is worth increasing the
> complexity of the language.
>
> Syntax won't get added to make the language more "perfect" to some
> ideals (especially not ideals to some paradigm like OOP, as opposed to
> its own internal ideals of readability, ease and practicality).
>
> Syntax is a burden. Every change in syntax, every addition in syntax,
> requires everyone's to mental investment to increase: it costs more
> mental energy to use the language, to fully understand it, then it did
> before.
>


But how could the syntax could be a burden? It is easy to
understand. And the reason why needs it is also clear, making class
attributes more like a dictionary, isn't this why people insists we
should have dynamic attribute creation via assigments?

This seems to be unfair. :)

>
> Is Python perhaps less perfect, pure, with that addition to the
> language denied?
>
> Who cares? Perfection is what the Borg* worship, I like understandable. :)

Well, using setattr() rather than trivial assignments is also
understandable, in fact, for me the former is even more understandable,
it shows more clearly when I am adding a new attribute, I am programming
classes, not non-classes.

--
Live like a child, think like the god.