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. The claim was
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 clearly
states that an
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 expression
statement,
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 arguing that
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 on the end
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 so
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 expressions is also
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
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.
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
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 a
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
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: every
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?
/F
--
http://mail.python.org/mailman/listinfo/python-list
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
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.
/F
--
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 difference, please
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
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 answers
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.
And what else
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 is a statement. if
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, that is
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. So
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 something
[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 straightforward
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
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
[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 effort.
Paul Rubin:
[EMAIL PROTECTED] writes:
about Scheme macros
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
29 matches
Mail list logo