Re: Python syntax wart

2007-09-10 Thread Carl Banks
On Sep 10, 8:07 am, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > On Sep 9, 11:20 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > > > It may be that a language that doesn't have a statement terminator > > (which can be end-of-line) needs a statement continuation symbol. > > (Excluding languages

Re: Python syntax wart

2007-09-10 Thread Steven W. Orr
On Monday, Sep 10th 2007 at 08:34 -, quoth Marc 'BlackJack' Rintsch: =>On Mon, 10 Sep 2007 20:19:08 +1200, Lawrence D'Oliveiro wrote: => =>> In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch =>> wrote: =>> =>>> I see a tree structure here ... =>> =>> Good, you're improving. => =>Thank

Re: Python syntax wart

2007-09-10 Thread Jason
On Sep 8, 11:16 pm, Lawrence D'Oliveiro <[EMAIL PROTECTED] central.gen.new_zealand> wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Yes, you can avoid them if you can include parentheses > somehow, but this isn't always possible. > > Possible: > >

Re: Python syntax wart

2007-09-10 Thread TheFlyingDutchman
On Sep 10, 4:45 am, Bjoern Schliessmann wrote: > TheFlyingDutchman wrote: > > It may be that a language that doesn't have a statement terminator > > (which can be end-of-line) needs a statement continuation symbol. > > Which language could that be? I can hardly imagine making a complex > program o

Re: Python syntax wart

2007-09-10 Thread TheFlyingDutchman
On Sep 9, 11:20 pm, TheFlyingDutchman <[EMAIL PROTECTED]> wrote: > It may be that a language that doesn't have a statement terminator > (which can be end-of-line) needs a statement continuation symbol. > (Excluding languages like Lisp that have parentheses everywhere). Actually I guess Python does

Re: Python syntax wart

2007-09-10 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Marc 'BlackJack' >> I see a tree structure here ... > > Good, you're improving. Tree structures can't, IMHO, be called two-dimensional. Although, you can represent them with a two-dimensional graph. If the tree gets more complex this c

Re: Python syntax wart

2007-09-10 Thread Bjoern Schliessmann
TheFlyingDutchman wrote: > It may be that a language that doesn't have a statement terminator > (which can be end-of-line) needs a statement continuation symbol. Which language could that be? I can hardly imagine making a complex program out of one statement. Regards, Björn -- BOFH excuse #1

Re: Python syntax wart

2007-09-10 Thread Bjoern Schliessmann
Gabriel Genellina wrote: > Do you know the Befunge language? Program flow is not lineal but > along a 2D grid. There are variants over toroids and more bizarre > surfaces, even using 3D. Ah, I remember. Once read about it. Really cool idea :) Regards, Björn -- BOFH excuse #149: Dew on the te

Re: Python syntax wart

2007-09-10 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Bjoern >> What's wrong with this: >> >> for Link in GetEachRecord( > > Then you're no longer showing the syntax structure in two > dimensions. Why should I want to? :) BTW, this is the first time I read about "two dimensional syntax

Re: Python syntax wart

2007-09-10 Thread J. Cliff Dyer
J. Cliff Dyer wrote: Lawrence D'Oliveiro wrote: In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: What's wrong with this: for Link in GetEachRecord( Then you're no longer showing the syntax structure in two dimensions. If somebody handed me a program of more than twenty

Re: Python syntax wart

2007-09-10 Thread Duncan Booth
Stefan Behnel <[EMAIL PROTECTED]> wrote: > This actually sounds somewhat pointless to me. If complex things don't > fit into one line, a good way to deal with it is not to insist on > making them a single statement. > Or make them into a single method/function call. I would post some pseudo- cod

Re: Python syntax wart

2007-09-10 Thread Gabriel Genellina
On 9 sep, 08:14, Bjoern Schliessmann wrote: > How can a statement be two-dimensional? Like a two-dimensionalTuringMachine? Do you know the Befunge language? Program flow is not lineal but along a 2D grid. There are variants over toroids and more bizarre surfaces, even using 3D. "Befunge is beli

Re: Python syntax wart

2007-09-10 Thread Stefan Behnel
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch > wrote: >> And this is also easily written that way in Python if you don't insist on >> the line break after the ``if`` or can live with backslashes. > > Which is precisely the point. This actually sounds somew

Re: Python syntax wart

2007-09-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Sep 2007 20:19:08 +1200, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch > wrote: > >> I see a tree structure here ... > > Good, you're improving. Thanks. >> ... but still no table. > > Who said anything about a table? Me. If that statement i

Re: Python syntax wart

2007-09-10 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch wrote: > I see a tree structure here ... Good, you're improving. > ... but still no table. Who said anything about a table? > And this is also easily written that way in Python if you don't insist on > the line break after the ``if`` or

Re: Python syntax wart

2007-09-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Sep 2007 19:54:49 +1200, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch > wrote: > >> On Mon, 10 Sep 2007 15:02:58 +1200, Lawrence D'Oliveiro wrote: >> >>> In message <[EMAIL PROTECTED]>, Bjoern Schliessmann >>> wrote: >>> Lawrence D'Olivei

Re: Python syntax wart

2007-09-10 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Marc 'BlackJack' Rintsch wrote: > On Mon, 10 Sep 2007 15:02:58 +1200, Lawrence D'Oliveiro wrote: > >> In message <[EMAIL PROTECTED]>, Bjoern Schliessmann >> wrote: >> >>> Lawrence D'Oliveiro wrote: But then you can no longer use indentation to display the >>>

Re: Python syntax wart

2007-09-10 Thread Marc 'BlackJack' Rintsch
On Mon, 10 Sep 2007 15:02:58 +1200, Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > >> Lawrence D'Oliveiro wrote: >>> But then you can no longer use indentation to display the >>> two-dimensional structure of the statement. >> >> How can a statement be t

Re: Python syntax wart

2007-09-09 Thread TheFlyingDutchman
It may be that a language that doesn't have a statement terminator (which can be end-of-line) needs a statement continuation symbol. (Excluding languages like Lisp that have parentheses everywhere). -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > Lawrence D'Oliveiro wrote: >> But then you can no longer use indentation to display the >> two-dimensional structure of the statement. > > How can a statement be two-dimensional? Like this (from C++ code, but the idea is the same):

Re: Python syntax wart

2007-09-09 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Bjoern Schliessmann wrote: > What's wrong with this: > > for Link in GetEachRecord( Then you're no longer showing the syntax structure in two dimensions. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python syntax wart

2007-09-09 Thread stef mientki
James Stroud wrote: > Lawrence D'Oliveiro wrote: > >> The one thing I don't like about Python syntax is using backslashes to >> continue lines. Yes, you can avoid them if you can include parentheses >> somehow, but this isn't always possible. >> >> Possible: >> >> if ( >> quittin

Re: Python syntax wart

2007-09-09 Thread James Stroud
Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Yes, you can avoid them if you can include parentheses > somehow, but this isn't always possible. > > Possible: > > if ( > quitting > and > len

Re: Python syntax wart

2007-09-09 Thread Wildemar Wildenburger
Steven D'Aprano wrote: > That is quite possibly the ugliest piece of code I've ever seen in > Python. I'm impressed. Did you format it yourself or did you use a > professionally written code-uglifier? > Boy did that make me laugh! The notion of a "code uglifier" just is a pearl. (I hate to call

Re: Python syntax wart

2007-09-09 Thread Bjoern Schliessmann
Lawrence D'Oliveiro wrote: > But then you can no longer use indentation to display the > two-dimensional structure of the statement. How can a statement be two-dimensional? Like a two-dimensional Turing Machine? Regards, Björn -- BOFH excuse #156: Zombie processes haunting the computer --

Re: Python syntax wart

2007-09-09 Thread Stefan Behnel
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Stefan Behnel wrote: > >> He means he has to use backslashes instead of parentheses here. >> >> Which is not true, you could easily rephrase this as: >> >> for link in GetEachRecord( >> "links", >> ): >>

Re: Python syntax wart

2007-09-09 Thread Duncan Booth
Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > >> The one thing I don't like about Python syntax is using backslashes to >> continue lines. > > Then don't use them. Put everything in one long line. > > Or do something like this. Ins

Re: Python syntax wart

2007-09-09 Thread Bjoern Schliessmann
m_episode"]}), > Link["from_episode"] > ) > ) > #end for IMHO, that's no Python syntax wart, but a coding style wart. What's wrong with this: for Link in GetEachRecord( "links", (&qu

Re: Python syntax wart

2007-09-09 Thread Steven D'Aprano
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Then don't use them. Put everything in one long line. Or do something like this. Instead of for Link in GetEachRecord("lots", "and", "lots",

Re: Python syntax wart

2007-09-09 Thread Carl Banks
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Yes, you can avoid them if you can include parentheses > somehow, but this isn't always possible. > > Possible: > > if ( > qui

Re: Python syntax wart

2007-09-08 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Stefan Behnel wrote: > He means he has to use backslashes instead of parentheses here. > > Which is not true, you could easily rephrase this as: > > for link in GetEachRecord( > "links", > ): > out.write( > ..

Re: Python syntax wart

2007-09-08 Thread Stefan Behnel
Marc 'BlackJack' Rintsch wrote: > On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > >> The one thing I don't like about Python syntax is using backslashes to >> continue lines. Yes, you can avoid them if you can include parentheses >> somehow, but this isn't always possible. >> >> P

Re: Python syntax wart

2007-09-08 Thread Marc 'BlackJack' Rintsch
On Sun, 09 Sep 2007 17:16:05 +1200, Lawrence D'Oliveiro wrote: > The one thing I don't like about Python syntax is using backslashes to > continue lines. Yes, you can avoid them if you can include parentheses > somehow, but this isn't always possible. > > Possible: > > […] > > Not possible: > >

Python syntax wart

2007-09-08 Thread Lawrence D'Oliveiro
The one thing I don't like about Python syntax is using backslashes to continue lines. Yes, you can avoid them if you can include parentheses somehow, but this isn't always possible. Possible: if ( quitting and len(client["to_write"]) == 0 and