Re: Python rocks

2007-06-14 Thread Carl Banks
On Jun 3, 11:56 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Allowing a trailing ! in method names has no such cost, because in no > language I know is ! used as a "postfix unary operator"; Some math oriented languages use it as the factorial function. E.g., Mathematica: In[1] := 10! Out[1]=

Re: Python rocks

2007-06-14 Thread Aahz
In article <[EMAIL PROTECTED]>, George Sakkis <[EMAIL PROTECTED]> wrote: >On Jun 2, 4:58 pm, [EMAIL PROTECTED] (Aahz) wrote: >> In article <[EMAIL PROTECTED]>, >> George Sakkis <[EMAIL PROTECTED]> wrote: >>> >>>- Strings being iterable; unfortunately this will stay in Py3K. >> >> I'll repeat the

Re: Python rocks

2007-06-05 Thread Klaas
On Jun 3, 8:56 am, [EMAIL PROTECTED] (Alex Martelli) wrote: > Allowing a trailing ! in method names has no such cost, because in no > language I know is ! used as a "postfix unary operator"; the gain in the > convention "mutators end with !" is not huge, but substantial. So, the > tradeoffs are d

Re: Python rocks

2007-06-04 Thread Michele Simionato
On Jun 2, 10:59 pm, Mark Carter <[EMAIL PROTECTED]> wrote: > Josiah Carlson wrote: > > Mark Carter wrote: > >> Not that I'm particularly knowledgeable about language design issues, > >> but maybe closures and slightly different scoping rules would be nice. > > > Python has had closures for years. >

Re: Python rocks

2007-06-03 Thread George Sakkis
On Jun 2, 4:58 pm, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > George Sakkis <[EMAIL PROTECTED]> wrote: > > > > >I had probably stumbled on many/most of the common pitfalls usually > >mentioned (e.g.http://www.ferg.org/projects/python_gotchas.html, > >http://zephyrfalcon.o

Re: Python rocks

2007-06-03 Thread Alex Martelli
Mark Carter <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > Mark Carter <[EMAIL PROTECTED]> wrote: > > > Yes, GMP is a pain to compile (especially on Mac OS X), but I believe > > > Just mentioning this in case you want to give Scheme another chance > > Thanks. I'll take a look at it. You

Re: Python rocks

2007-06-03 Thread Alex Martelli
Mark Carter <[EMAIL PROTECTED]> wrote: > Alex Martelli wrote: > > Josiah Carlson <[EMAIL PROTECTED]> wrote: > > > >>> pitfall of Python is knowing whether an operation is destructive or not. > >> If it returns None, it probably changes the content of an object. > > > > A reasonable heuristic, bu

Re: Python rocks

2007-06-03 Thread Mark Carter
Alex Martelli wrote: > Josiah Carlson <[EMAIL PROTECTED]> wrote: > >>> pitfall of Python is knowing whether an operation is destructive or not. >> If it returns None, it probably changes the content of an object. > > A reasonable heuristic, but with lots of exceptions, alas: > somedict.get(so

Re: Python rocks

2007-06-03 Thread Mark Carter
Alex Martelli wrote: > Mark Carter <[EMAIL PROTECTED]> wrote: > Yes, GMP is a pain to compile (especially on Mac OS X), but I believe > Just mentioning this in case you want to give Scheme another chance Thanks. I'll take a look at it. I think I've decided to finish off my little in project in

Re: Python rocks

2007-06-03 Thread Hendrik van Rooyen
"Mark Carter" <[EMAIL PROTECTED]> wrote: > Josiah Carlson wrote: > > What kind of scoping did you desire? > > Well, I had in mind so that if you defined a function, but wanted to > access a global var, that you didn't have to use the global keyword. Not > much of a biggie, I guess. You can ac

Re: Python rocks

2007-06-02 Thread Josiah Carlson
Mark Carter wrote: > Josiah Carlson wrote: >> What kind of scoping did you desire? > > Well, I had in mind so that if you defined a function, but wanted to > access a global var, that you didn't have to use the global keyword. Not > much of a biggie, I guess. You already get read access to glo

Re: Python rocks

2007-06-02 Thread Alex Martelli
Josiah Carlson <[EMAIL PROTECTED]> wrote: > > pitfall of Python is knowing whether an operation is destructive or not. > > If it returns None, it probably changes the content of an object. A reasonable heuristic, but with lots of exceptions, alas: somedict.get(somekey) will often return None

Re: Python rocks

2007-06-02 Thread Alex Martelli
Mark Carter <[EMAIL PROTECTED]> wrote: > I picked Chicken Scheme for OS X. Things started well, and even the web ... > that; but I found that it ultimately depended on gmp, which turned out a > pain to compile. Yes, GMP is a pain to compile (especially on Mac OS X), but I believe that the Univ

Re: Python rocks

2007-06-02 Thread Mark Carter
Josiah Carlson wrote: > Mark Carter wrote: >> Not that I'm particularly knowledgeable about language design issues, >> but maybe closures and slightly different scoping rules would be nice. > > Python has had closures for years. I just looked up http://www.secnetix.de/~olli/Python/lambda_functio

Re: Python rocks

2007-06-02 Thread Aahz
In article <[EMAIL PROTECTED]>, George Sakkis <[EMAIL PROTECTED]> wrote: > >I had probably stumbled on many/most of the common pitfalls usually >mentioned (e.g. http://www.ferg.org/projects/python_gotchas.html, >http://zephyrfalcon.org/labs/python_pitfalls.html) while learning, but >picked them up

Re: Python rocks

2007-06-02 Thread Josiah Carlson
Mark Carter wrote: > Not that I'm particularly knowledgeable about language design issues, > but maybe closures and slightly different scoping rules would be nice. Python has had closures for years. What kind of scoping did you desire? > A > pitfall of Python is knowing whether an operation is

Re: Python rocks

2007-06-02 Thread George Sakkis
On Jun 2, 12:31 pm, Steve Howell <[EMAIL PROTECTED]> wrote: > --- Mark Carter <[EMAIL PROTECTED]> wrote: > > > Well, I know I'm preaching to the converted - but > > Python rocks. > > [...] > > A few questions from the choir: > > As a recent ne

Re: Python rocks

2007-06-02 Thread Mark Carter
Steve Howell wrote: > --- Mark Carter <[EMAIL PROTECTED]> wrote: > >> Well, I know I'm preaching to the converted - but >> Python rocks. >> [...] > > A few questions from the choir: > > As a recent newcomer to the language, did you > encount

Re: Python rocks

2007-06-02 Thread Steve Howell
--- Mark Carter <[EMAIL PROTECTED]> wrote: > Well, I know I'm preaching to the converted - but > Python rocks. > [...] A few questions from the choir: As a recent newcomer to the language, did you encounter any traps or pitfalls while you were learning? Also, could you si

Python rocks

2007-06-02 Thread Mark Carter
Well, I know I'm preaching to the converted - but Python rocks. I've been enchanted by the siren calls of Scheme, Lisp and Forth, but in the end, I find Python much easier. I even tried a little bit of Tcl. To give a bit of context ... I have recently switched from Windows to OS X an