Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Andy Freeman
On Jun 28, 1:09 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Andy Freeman wrote: > > On Jun 27, 11:41 pm, John Nagle <[EMAIL PROTECTED]> wrote: > > While I agree that weak pointers are good and can not be an > > afterthought, I've written code where "ba

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-28 Thread Andy Freeman
On Jun 27, 11:41 pm, John Nagle <[EMAIL PROTECTED]> wrote: > One right answer would be a pure reference counted system where > loops are outright errors, and you must use weak pointers for backpointers. > ... The general > idea is that pointers to

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 27, 8:09 am, "Chris Mellon" <[EMAIL PROTECTED]> wrote: > On 6/27/07, Andy Freeman <[EMAIL PROTECTED]> wrote: > > It's easy enough to get around the lack of objectness and add the > > equivalent of an iterator iterface, in either language. The

Re: Too many 'self' in python.That's a big flaw in this language.

2007-06-27 Thread Andy Freeman
On Jun 27, 2:54 pm, John Nagle <[EMAIL PROTECTED]> wrote: > >> But, what about something in between like only > >> using the dot (.) for a shorter notation? > > How about "Mavis Beacon Teaches Typing"? How about no "wouldn't it be better" suggestions until at least three months after the sugg

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 26, 10:03 am, Paul Rubin wrote: > > Map doesn't work on generators or iterators because they're not part > > of the common lisp spec, but if someone implemented them as a library, > > said library could easily include a map that handled them as well. > > Right, mor

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-27 Thread Andy Freeman
On Jun 27, 1:15 am, Paul Rubin wrote: > Dennis Lee Bieber <[EMAIL PROTECTED]> writes: > > >What happens when two individuals release "libraries" using these > > proposed macros -- and have implement conflicting macros using the same > > identifiers -- and you try to u

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 10:10 am, Paul Rubin <http://[EMAIL PROTECTED]> wrote: > Andy Freeman <[EMAIL PROTECTED]> writes: > > Compare that with what a programmer using Python 2.4 has to do if > > she'd like the functionality provided by 2.5's with statement. Yes, > >

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 8:49 am, Andy Freeman <[EMAIL PROTECTED]> wrote: > Map doesn't work on generators or iterators because they're not part > of the common lisp spec, but if someone implemented them as a library, > said library could easily include a map that handled them as well

Re: Python's "only one way to do it" philosophy isn't good?

2007-06-26 Thread Andy Freeman
On Jun 26, 12:26 am, Paul Rubin wrote: > Precisely, I think that's what Alexander was trying to get across, Lisp > didn't have a uniform interface for traversing different types of sequence. And he's wrong, at least as far as common lisp is concerned - map does exactly t

Re: Lisp-like macros in Python?

2007-05-01 Thread Andy Freeman
On May 1, 9:10 am, sturlamolden <[EMAIL PROTECTED]> wrote: > I was > wondering if it is possible to emulate some of the functionality in > Python using a function decorator that evals Python code in the stack > frame of the caller. The macro would then return a Python expression > as a string. Gran