New syntax for blocks

Bruno Desthuilliers bdesth.quelquechose at free.quelquepart.fr
Fri Nov 13 16:20:16 EST 2009


r a écrit :
> On Nov 12, 2:37 pm, Bruno Desthuilliers
> <bdesth.quelquech... at free.quelquepart.fr> wrote:
> 
>>> Oh i get it now! If i assign a valid value to a variable the variable
>>> is also valid...thats...thats... GENUIS! *sarcasm*
>> It's not about "assigning a valid value to a variable", it's about the
>> name being created (or not) in the current namespace, whatever it's
>> bound to.
> 
> And thats what my sarcasm was alluding to. Steven's argument is moot
> because it will blow up either way due to the fact that "value" is non-
> existent! 

Sorry, but Steve's code, ie:

var = range(100)
if var:
  ...

will not break - after the first line, the name "var" exists, whether
it's bound to true or false value.

While with your proposal *as it is* (or at least as I and Steve
understood it), the existence of name "var" depends on some
unpredictable condition.

> Every argument that has been brought forth about how this
> will break is just False

Actually, identity testing on True or False is considered a very bad
practice. You really want equality testing <g>

> and basically a bunch of FUD! It just garbage
> so you can discredit the idea.

Please take a deep breath and calm down. There's no conspiracy, no
secret plan, no hidden agenda, and pointing out the shortcomings of a
proposals is definitly not "discredit"ing "the idea".

> It's actually quite funny when someone as small as me can bring down
> the iron curtain of c.l.py.
>   '''Mr. Gorbachev, Tear down this wall!'''
> 
> How about one of you "esteemed" Pythonista's show me a real example
> where it will break.

Steve did. But I'm afraid you missed his point.

> 
> PS: And if it were so dangerous why would someone as knowledgeable as
> Carl have stepped in and supported it.

Carl supported the idea of a syntax for "assignment and test", but
that's not what Steve's comments were about - well, it may be that Steve
also refuses to consider the whole idea, but he still has a good point
wrt/ some shortcoming of your idea in it's current state.

> I think because (like me) Carl
> put's the language before sewing circles. I think it's just personal
> like all the times before,

Well, to be true, you did manage to make a clown of yourself more than
once, so don't be surprised if some people here tend to treat you as one
- even when you come up with something that _may_ have some value.

> that's OK, i have very thick skin! If it's
> wrong for a good reason i will graciously accept that, but no one has
> proven it's non-worth, not yet!

wrong != non-worth. I mean: having some possibly valid use case doesn't
imply the proposed solution is the good one in it's current state. And
pointing out the shortcomings of the proposed solution doesn't imply the
problem is not real neither (now whether it's a critical enough problem
to _require_ a solution is another problem I won't even debate here).

Anyway, just going to personal considerations won't help. If you ever
hope to be taken seriously, first behave as a reasonably sensible and
mature person.

My (hopefully friendly) 2 cents.



More information about the Python-list mailing list