Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-15 Thread NickC
Fredrik Lundh wrote: > Antoon Pardon wrote: > > > One place where I would use such a feature is in a unittest > > package. I think being able to write self.assert or self.raise > > looks better than having to append an underscore. > > patch here: > > http://mail.python.org/pipermail/python-list/20

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread Andrew McLean
Roy Smith wrote: > > As I remember, you didn't need the whitespace either. IIRC, your example > above could have been written as: > > PROGRAMKWDS > REALREAL,WRITE > WRITE=1.0 > REAL=2.0 > WRITE(*,*)WRITE,REAL > END > It's stranger than that. FORTRAN 77 is in

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread projecktzero
Paul Rubin wrote: > Antoon Pardon <[EMAIL PROTECTED]> writes: > > This is just an idea of mine, nothing I expect python to adapt. > > But just suppose the language allowed for words in bold. A word > > in bold would be considered a reserved word, a word in non bold > > would be an identifier. > > H

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread Kay Schluehr
Carl Banks wrote: > metaperl wrote: > > --> python -i > > >>> class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > >>> > > > > > > Why isn' t the parser smart enough to see that class followed by an > > identifier is used for class

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread [EMAIL PROTECTED]
> One place where I would use such a feature is in a unittest > package. I think being able to write self.assert or self.raise > looks better than having to append an underscore. Maybe that is a good argumment for Py.Test ;) -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-14 Thread Fredrik Lundh
Cliff Wells wrote: >> patch here: >> >> http://mail.python.org/pipermail/python-list/2001-June/047996.html > > Did you happen to remember this post or is Google *really* your friend? Have you taken The Oath? If not, I'm afraid I cannot tell you. -- http://mail.python.org/mailman/listinfo/pyt

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Cliff Wells
On Wed, 2006-09-13 at 10:30 +0200, Fredrik Lundh wrote: > Antoon Pardon wrote: > > > One place where I would use such a feature is in a unittest > > package. I think being able to write self.assert or self.raise > > looks better than having to append an underscore. > > patch here: > > http://ma

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Grant Edwards
On 2006-09-13, metaperl <[EMAIL PROTECTED]> wrote: > One way to avoid the issue I brought up is for the syntax to > be very regular... like Lisp or Tcl: > > set class "algebra" > > (setq class "algebra") Unfortunately (or fortunately?) the human mind isn't very regular and seems to prefer structu

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread metaperl
One way to avoid the issue I brought up is for the syntax to be very regular... like Lisp or Tcl: set class "algebra" (setq class "algebra") -- http://mail.python.org/mailman/listinfo/python-list

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread John Roth
metaperl wrote: > --> python -i > >>> class = "algebra" > File "", line 1 > class = "algebra" > ^ > SyntaxError: invalid syntax > >>> > > > Why isn' t the parser smart enough to see that class followed by an > identifier is used for class definition but class followed by equals is

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Fredrik Lundh
Antoon Pardon wrote: > One place where I would use such a feature is in a unittest > package. I think being able to write self.assert or self.raise > looks better than having to append an underscore. patch here: http://mail.python.org/pipermail/python-list/2001-June/047996.html -- http://ma

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Paul Rubin wrote: > Antoon Pardon <[EMAIL PROTECTED]> writes: >> This is just an idea of mine, nothing I expect python to adapt. >> But just suppose the language allowed for words in bold. A word >> in bold would be considered a reserved word, a word in non bold >> would be an ident

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Paul Rubin
Antoon Pardon <[EMAIL PROTECTED]> writes: > This is just an idea of mine, nothing I expect python to adapt. > But just suppose the language allowed for words in bold. A word > in bold would be considered a reserved word, a word in non bold > would be an identifier. Heh, sounds like ColorForth, in

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-13 Thread Antoon Pardon
On 2006-09-13, Carl Banks <[EMAIL PROTECTED]> wrote: > metaperl wrote: >> --> python -i >> >>> class = "algebra" >> File "", line 1 >> class = "algebra" >> ^ >> SyntaxError: invalid syntax >> >>> >> >> >> Why isn' t the parser smart enough to see that class followed by an >> identi

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Carl Banks" <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > > IBM (PL/I's inventor and rabid defender) found out the hard way that > > making the parser more complicated, slow and bug-prone in order to allow > > such absurd obfuscation was NOT a popular tra

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Paddy
Cliff Wells wrote: > On Tue, 2006-09-12 at 18:05 -0700, Robert Hicks wrote: > > metaperl wrote: > > > Istvan Albert wrote: > > > > metaperl wrote: > > > > > --> python -i > > > > > >>> class = "algebra" > > > > > File "", line 1 > > > > > class = "algebra" > > > > > ^ > > > > > Syn

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Carl Banks
Alex Martelli wrote: > IBM (PL/I's inventor and rabid defender) found out the hard way that > making the parser more complicated, slow and bug-prone in order to allow > such absurd obfuscation was NOT a popular trade-off -- despite IBM's > alleged monopoly power, PL/I is now basically dead while t

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Alex Martelli) wrote: > metaperl <[EMAIL PROTECTED]> wrote: > > > Diez B. Roggisch wrote: > > > metaperl schrieb: > > > > --> python -i > > > class = "algebra" > > > > File "", line 1 > > > > class = "algebra" > > > > ^ >

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Alex Martelli
Steve Holden <[EMAIL PROTECTED]> wrote: > Otherwise you could try and fix the error, like the PL/1 F-level > compiler used to. This would usually work when all that was wrong was a > missing semicolon, but it frequently went completely berserk in other Ah, yeah, I forgot that particularly endear

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Alex Martelli
metaperl <[EMAIL PROTECTED]> wrote: > Diez B. Roggisch wrote: > > metaperl schrieb: > > > --> python -i > > class = "algebra" > > > File "", line 1 > > > class = "algebra" > > > ^ > > > SyntaxError: invalid syntax > > > > > > > > > Why isn' t the parser smart enough to see

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Alex Martelli
metaperl <[EMAIL PROTECTED]> wrote: Yes, keywords are always reserved. The one major language that tried to do otherwise was PL/I, where you could code, e.g.: if if = if then then = else else else = if ((of course, '=' was also polimorpically read as either assignment OR comparison -- I gathe

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Carl Banks
metaperl wrote: > --> python -i > >>> class = "algebra" > File "", line 1 > class = "algebra" > ^ > SyntaxError: invalid syntax > >>> > > > Why isn' t the parser smart enough to see that class followed by an > identifier is used for class definition but class followed by equals is

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Cliff Wells
On Tue, 2006-09-12 at 18:05 -0700, Robert Hicks wrote: > metaperl wrote: > > Istvan Albert wrote: > > > metaperl wrote: > > > > --> python -i > > > > >>> class = "algebra" > > > > File "", line 1 > > > > class = "algebra" > > > > ^ > > > > SyntaxError: invalid syntax > > > > > > De

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Robert Hicks
metaperl wrote: > Istvan Albert wrote: > > metaperl wrote: > > > --> python -i > > > >>> class = "algebra" > > > File "", line 1 > > > class = "algebra" > > > ^ > > > SyntaxError: invalid syntax > > > > Designing a syntax to avoid all possible newbie errors is impractical > > beca

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Steve Holden
metaperl wrote: > Istvan Albert wrote: > >>metaperl wrote: >> >>>--> python -i >>> >>class = "algebra" >>> >>> File "", line 1 >>>class = "algebra" >>> ^ >>>SyntaxError: invalid syntax >> >>Designing a syntax to avoid all possible newbie errors is impractical >>because as soon a

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
Istvan Albert wrote: > metaperl wrote: > > --> python -i > > >>> class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > Designing a syntax to avoid all possible newbie errors is impractical > because as soon as you are finished with o

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
Diez B. Roggisch wrote: > metaperl schrieb: > > --> python -i > class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > > > > > Why isn' t the parser smart enough to see that class followed by an > the few reserved words won't

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
Istvan Albert wrote: > metaperl wrote: > > --> python -i > > >>> class = "algebra" > > File "", line 1 > > class = "algebra" > > ^ > > SyntaxError: invalid syntax > > Designing a syntax to avoid all possible newbie errors is impractical > because as soon as you are finished with o

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Istvan Albert
metaperl wrote: > --> python -i > >>> class = "algebra" > File "", line 1 > class = "algebra" > ^ > SyntaxError: invalid syntax Designing a syntax to avoid all possible newbie errors is impractical because as soon as you are finished with one iteration the new newbies will start m

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Richard Brodie
"metaperl" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Why isn' t the parser smart enough to see that class followed by an > identifier is used for class definition but class followed by equals is > a simple assignment? Because it's simpler to reserve words than worry about po

Re: Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread Diez B. Roggisch
metaperl schrieb: > --> python -i class = "algebra" > File "", line 1 > class = "algebra" > ^ > SyntaxError: invalid syntax > > > Why isn' t the parser smart enough to see that class followed by an > identifier is used for class definition but class followed by equals is >

Are Python's reserved words reserved in places they dont need to be?

2006-09-12 Thread metaperl
--> python -i >>> class = "algebra" File "", line 1 class = "algebra" ^ SyntaxError: invalid syntax >>> Why isn' t the parser smart enough to see that class followed by an identifier is used for class definition but class followed by equals is a simple assignment? Also, I had