Paul Rubin wrote:
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
Huh? Expressions are not statements except when they're "expression
statements"? What kind of expression is not an expression statement?
any expression that is used in a content that is not an expression
statement,
of course.
Come on
Antoon Pardon wrote:
Op 2005-01-14, Roel Schroeven schreef <[EMAIL PROTECTED]>:
Antoon Pardon wrote:
IMO we have a: dogs are mamals kind of relationship in Python.
I see what you mean, but I don't think it's true.
Every expression can be used where a statement is expected.
(And this can be worded
Antoon Pardon wrote:
> Well IMO I have explained clearly that I understood this in a set
> logical sense in my first response.
what does "first" mean on your planet?
--
http://mail.python.org/mailman/listinfo/python-list
Op 2005-01-14, Roel Schroeven schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>> IMO we have a: dogs are mamals kind of relationship in Python.
>
> I see what you mean, but I don't think it's true.
>
>> Every expression can be used where a statement is expected.
>> (And this can be worded as: e
Antoon Pardon wrote:
IMO we have a: dogs are mamals kind of relationship in Python.
I see what you mean, but I don't think it's true.
Every expression can be used where a statement is expected.
(And this can be worded as: every expression is a statement.)
Not really. An expression statement is a st
Skip Montanaro wrote:
Fredrik> no, expressions CAN BE USED as statements. that doesn't mean
Fredrik> that they ARE statements, unless you're applying belgian logic.
Hmmm... I'd never heard the term "belgian logic" before. Googling provided
a few uses, but no formal definition (maybe it's
Tim Jarman wrote:
> IANA French person, but I believe that Belgians are traditionally
> regarded as stupid in French culture, so "Belgian logic" would be
> similar to "Irish logic" for an English person. (Feel free to insert
> your own cultural stereotypes as required. :)
Ok.
http://www.urbandic
Skip Montanaro wrote:
>
> Fredrik> no, expressions CAN BE USED as statements. that doesn't mean
> Fredrik> that they ARE statements, unless you're applying belgian
> logic.
>
> Hmmm... I'd never heard the term "belgian logic" before. Googling
> provided a few uses, but no formal d
Craig Ringer schrieb:
And then we have iteration
(generator expressions, list comprehensions, for loops, ...?) over
(sequences, iterators, generators)
Just sequences and iterators. Generators are functions which return
iterators. Sequences and iterators provide two ways to build
containers.
My
Skip Montanaro wrote:
> Fredrik> no, expressions CAN BE USED as statements. that doesn't
mean
> Fredrik> that they ARE statements, unless you're applying belgian
logic.
>
> Hmmm... I'd never heard the term "belgian logic" before. Googling
provided
> a few uses, but no formal definition (may
Op 2005-01-14, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>>> no, expressions CAN BE USED as statements. that doesn't mean
>>> that they ARE statements, unless you're applying belgian logic.
>>
>> No I am applying set logic. Any string that is in the set of
>> valid expres
Fredrik> no, expressions CAN BE USED as statements. that doesn't mean
Fredrik> that they ARE statements, unless you're applying belgian logic.
Hmmm... I'd never heard the term "belgian logic" before. Googling provided
a few uses, but no formal definition (maybe it's a European phrase s
Op 2005-01-14, Nick Coghlan schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>> No I am applying set logic. Any string that is in the set of
>> valid expressions is also in the set of valid statements.
>
> According to Python's grammar, this is not the case. It requires a NEWLINE or
> ";" token
Antoon Pardon wrote:
>> no, expressions CAN BE USED as statements. that doesn't mean
>> that they ARE statements, unless you're applying belgian logic.
>
> No I am applying set logic. Any string that is in the set of
> valid expressions is also in the set of valid statements.
since you're arguin
Antoon Pardon wrote:
No I am applying set logic. Any string that is in the set of
valid expressions is also in the set of valid statements.
According to Python's grammar, this is not the case. It requires a NEWLINE or
";" token on the end to turn the expression into a statement. Actually appending
Op 2005-01-14, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
> Paul Rubin wrote:
>
>>> > Huh? Expressions are not statements except when they're "expression
>>> > statements"? What kind of expression is not an expression statement?
>>>
>>> any expression that is used in a content that is not an expr
Op 2005-01-13, Terry Reedy schreef <[EMAIL PROTECTED]>:
>
> "Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
> news:[EMAIL PROTECTED]
>> Op 2005-01-13, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
>>> Antoon Pardon wrote:
>>>
Well, it seems that Guido is wrong then. The documentation clearl
Paul Rubin wrote:
>> > Huh? Expressions are not statements except when they're "expression
>> > statements"? What kind of expression is not an expression statement?
>>
>> any expression that is used in a content that is not an expression statement,
>> of course.
>
> Come on, that is vacuous. Th
Nick Coghlan <[EMAIL PROTECTED]> writes:
> So, precisely how should one go about cleanly embedding something that
> cares about whitespace into a context which doesn't care in the
> slightest?
Treat the macro like a function call whose arguments are thunks made
from the macro arguments, or somethi
Paul Rubin wrote:
Come on, that is vacuous. The claim was "expressions are not
statements". But it turns out that expressions ARE statements. The
explanation is "well, that's because they're expression statements".
And there is no obvious case of an expression that can't be used as a
statement.
"Fredrik Lundh" <[EMAIL PROTECTED]> writes:
> > Huh? Expressions are not statements except when they're "expression
> > statements"? What kind of expression is not an expression statement?
>
> any expression that is used in a content that is not an expression statement,
> of course.
Come on, th
Bengt Richter wrote:
> Hm, that makes me wonder, is there an intermediate "returning of value" in
>x = y = z = 123
> ?
no. that statement evaluates the expression (123 in this case), and assigns
the result (the integer object 123) to each target (x, y, z), in order. or to
quote the languag
On Thu, 13 Jan 2005 09:29:49 -0500, Steve Holden <[EMAIL PROTECTED]> wrote:
>Fredrik Lundh wrote:
>
>> Antoon Pardon wrote:
>>
>>
>>>Well, it seems that Guido is wrong then. The documentation clearly
>>>states that an expression is a statement.
>>
>>
>> no, it says that an expression statement
Paul Rubin wrote:
> Huh? Expressions are not statements except when they're "expression
> statements"? What kind of expression is not an expression statement?
any expression that is used in a content that is not an expression statement,
of course.
reading the python language reference should h
"Terry Reedy" <[EMAIL PROTECTED]> writes:
> >>> Well, it seems that Guido is wrong then. The documentation clearly
> >>> states that an expression is a statement.
> >>
> >> no, it says that an expression statement is a statement. if you don't
> >> understand the difference, please *plonk* yourself
"Antoon Pardon" <[EMAIL PROTECTED]> wrote in message
news:[EMAIL PROTECTED]
> Op 2005-01-13, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
>> Antoon Pardon wrote:
>>
>>> Well, it seems that Guido is wrong then. The documentation clearly
>>> states that an expression is a statement.
>>
>> no, it says
On Thu, 2005-01-13 at 08:39 +, Antoon Pardon wrote:
> > At best it would offer new paradigms for existing constructs (violating
> > the "there should be one obvious way to do it" zen); at worst it would
> > obfuscate the whole language.
>
> That zen is already broken. Look at the number of
Fredrik Lundh wrote:
Antoon Pardon wrote:
Well, it seems that Guido is wrong then. The documentation clearly
states that an expression is a statement.
no, it says that an expression statement is a statement. if you don't
understand the difference, please *plonk* yourself.
OK then, "The documenta
Op 2005-01-13, Fredrik Lundh schreef <[EMAIL PROTECTED]>:
> Antoon Pardon wrote:
>
>> Well, it seems that Guido is wrong then. The documentation clearly
>> states that an expression is a statement.
>
> no, it says that an expression statement is a statement. if you don't
> understand the differenc
Antoon Pardon wrote:
> Well, it seems that Guido is wrong then. The documentation clearly
> states that an expression is a statement.
no, it says that an expression statement is a statement. if you don't
understand the difference, please *plonk* yourself.
--
http://mail.python.org/mailman
Op 2005-01-12, Steve Holden schreef <[EMAIL PROTECTED]>:
>
> Given that Guido is on record as saying that expressions aren't
> statements because he wants those things to be separate, I don't really
> see why there's this consistent pressure to reverse that decision.
Well, it seems that Guido is
Paul Rubin wrote:
[EMAIL PROTECTED] writes:
I can't imagine how it could be worse than the learning curve of
__metaclass__, which we already have.
To me, learning macros *and their subtilities* was much more difficult
than learning metaclasses.
I guess I've only used Lisp macros in pretty straight
Paul Rubin wrote:
[EMAIL PROTECTED] writes:
2. One could proposed hygienic pattern-matching macros in Python,
similar to
Scheme syntax-rules macros. Again, it is not obvious how to
implement pattern-matching in Python in a non-butt-ugly way. Plus,
I feel hygienic macros quite limited and not worth
[EMAIL PROTECTED] writes:
> > I can't imagine how it could be worse than the learning curve of
> > __metaclass__, which we already have.
>
> To me, learning macros *and their subtilities* was much more difficult
> than learning metaclasses.
I guess I've only used Lisp macros in pretty straightfor
[EMAIL PROTECTED] writes:
> This is a bizarre idea if you want to make Python run faster. It is
> not so bizarre if what you want is to have access to Python from
> Lisp/Scheme in the same sense Jython has access to Java.
And it sounds very nice if you prefer writing Lisp code (or resort to
it if
Paul Rubin:
> [EMAIL PROTECTED] writes:
>>
> It wasn't obvious how to do it in Scheme either. There was quite
> a bit of head scratching and experimental implementation before
> there was consensus.
Actually I am not convinced there is consensus yet, i.e. there is a
non-negligible minority of s
[EMAIL PROTECTED] writes:
> 2. One could proposed hygienic pattern-matching macros in Python,
> similar to
> Scheme syntax-rules macros. Again, it is not obvious how to
> implement pattern-matching in Python in a non-butt-ugly way. Plus,
> I feel hygienic macros quite limited and not worth the effo
Paul Rubin wrote:
> How about macros? Some pretty horrible things have been done in C
> programs with the C preprocessor. But there's a movememnt afloat to
> add hygienic macros to Python. Got any thoughts about that?
"Movement" seems quite an exaggeration. Maybe 2-3 people made some
experiments,
38 matches
Mail list logo