Re: Re: Guido's new method definition idea

2008-12-06 Thread acerimusdux
Russ P. wrote: Python already uses shorthand extensively. How about "def"? For people who are so worried about self-explanatory symbols, what the heck does that stand for? Default? Defeat? Defect? Defunct? Defer? I think the difference here is that those other abbreviations are mostly fa

hifriends

2008-12-06 Thread deen . vdm
hi,visit the web for download the latest songs and music by clickhttp://musicsite-download.blogspot.com/ -- http://mail.python.org/mailman/listinfo/python-list

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Stefan Behnel
Lawrence D'Oliveiro wrote: > In message <[EMAIL PROTECTED]>, Arnaud Delobelle wrote: > >> * you seem to disregard the fact that in 'programming language' there >> is the word 'language'. A language is a way to _communicate_ >> information, in the case of a programming language you commu

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Arnaud Delobelle wrote: > * you give the impression of being arrogant; Oddly enough, I wasn't the one who started by criticizing other people's code. I have no ego about my code; I gladly accept criticisms. But perhaps some other people are not so thick-skinned a

Brain going crazy with recursive functions

2008-12-06 Thread 5lvqbwl02
I'm trying to solve the 9-tile puzzle using as functional an approach as possible. I've recently finished reading SICP and am deliberately avoiding easy python-isms for the more convoluted scheme/functional methods. The following function is trivial to do with for loops and directly accessing arr

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Arnaud Delobelle wrote: > * you seem to disregard the fact that in 'programming language' there > is the word 'language'. A language is a way to _communicate_ > information, in the case of a programming language you communicate > it to the computer bu

Brain going crazy with recursive functions

2008-12-06 Thread 5lvqbwl02
I'm trying to solve the 9-tile puzzle using as functional an approach as possible. I've recently finished reading SICP and am deliberately avoiding easy python-isms for the more convoluted scheme/functional methods. The following function is trivial to do with for loops and directly accessing arr

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Lawrence D'Oliveiro
In message <[EMAIL PROTECTED]>, Rhodri James wrote: > Yes, it's very pretty, and you're terribly clever. In six months' time > when you come back to make some engineering change and have to sit down > and break it back down into those simple pieces to remind yourself what > it's doing, "pretty" a

Re: Guido's new method definition idea

2008-12-06 Thread Lie
On Dec 6, 9:21 am, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > Hi folks, > > The story of the explicit self in method definitions has been > discussed to death and we all know it will stay. However, Guido > himself acknowledged that an alternative syntax makes perfect sense > and having both (

Re: Guido's new method definition idea

2008-12-06 Thread Lie
On Dec 7, 1:02 am, News123 <[EMAIL PROTECTED]> wrote: > What would be interesting would be some syntactical sugar to get rid of > the 'self' (at least in the code body). > > example: > class C: >     class_elements a,b,c,d > >     def method(self,arg): >         global d >         a,b,c = arg[0..3]

Re: Learning Python now coming from Perl

2008-12-06 Thread Aahz
In article <[EMAIL PROTECTED]>, Bertilo Wennergren <[EMAIL PROTECTED]> wrote: > >The main reason I waited until Python 3000 came out is the new way >Unicode is handled. The old way seemed really broken to me. Much of >what I do when I program consists of juggling Unicode text (real >Unicode text w

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 9:09�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 06 Dec 2008 18:09:07 -0800, Mensanator wrote: > > On Dec 6, 6:25 pm, Steven D'Aprano <[EMAIL PROTECTED] > > cybersource.com.au> wrote: > >> On Sat, 06 Dec 2008 14:36:07 -0800, Mensanator wrote: > >> > It was

Re: "as" keyword woes

2008-12-06 Thread Warren DeLano
> Date: Sat, 6 Dec 2008 12:13:16 -0800 (PST) > From: Carl Banks <[EMAIL PROTECTED]> > Subject: Re: "as" keyword woes > To: python-list@python.org > Message-ID: > > (snip) > > If you write a PEP, I advise you to try to sound less whiny and than > you have in this thread. > > (snip) Ehem, w

Re: Learning Python now coming from Perl

2008-12-06 Thread Roy Smith
In article <[EMAIL PROTECTED]>, "Python Nutter" <[EMAIL PROTECTED]> wrote: > At least if you push REs inform the readers where to get the a RE GUI > builder written in Python so they can build and *test* the complex and > unwieldy REs to perform anything beyond the basic pattern searches. Oh, my

Re: Guido's new method definition idea

2008-12-06 Thread Cameron Simpson
On 06Dec2008 11:30, Andreas Waldenburger <[EMAIL PROTECTED]> wrote: | On 6 Dec 2008 09:18:20 GMT Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> | wrote: | > On Sat, 06 Dec 2008 09:56:12 +0100, Antoine De Groote wrote: | > [snip reference to "preferably only one way to do it"] | > | > The reason why

Number of Python 3.x packages at the PyPI

2008-12-06 Thread excord80
Is there an easy way to see the number of PyPI packages which have been ported to Python 3? Are there any special arrangements necessary for PyPI packages which have both a Python 2.x version and a Python 3.x version? -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 6:42 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > > But it's ugly.  No amount of rationalization will make it not ugly. > > The dollar sign is ugly? I beg to differ. Nope, you're wrong. Carl Banks (See where this is going?) -- http://mail.python.org/mailman/listinfo/python-list

Re: "as" keyword woes

2008-12-06 Thread Carl Banks
On Dec 6, 8:17 pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sun, 07 Dec 2008 11:27:56 +1000, Nick Coghlan wrote: > > Warren DeLano wrote: > >> In other words we have lost the ability to refer to "as" as the > >> generalized OOP-compliant/syntax-independent method name for

Re: Python 3.0 automatic decoding of UTF16

2008-12-06 Thread John Machin
On Dec 7, 9:34 am, John Machin <[EMAIL PROTECTED]> wrote: > On Dec 7, 9:01 am, David Bolen <[EMAIL PROTECTED]> wrote: > > > Johannes Bauer <[EMAIL PROTECTED]> writes: > > > This is very strange - when using "utf16", endianness should be detected > > > automatically. When I simply truncate the trail

Re: operators as variables

2008-12-06 Thread James Stroud
macc_200 wrote: Hi, just starting programming and have an elementary question after playing around with lists but cannot find the answer with googling. I have a list of variables and I would like some of those variables to be integers and some to be operators so the list would look something l

Re: "as" keyword woes

2008-12-06 Thread Steven D'Aprano
On Sat, 06 Dec 2008 18:09:07 -0800, Mensanator wrote: > On Dec 6, 6:25�pm, Steven D'Aprano <[EMAIL PROTECTED] > cybersource.com.au> wrote: >> On Sat, 06 Dec 2008 14:36:07 -0800, Mensanator wrote: >> > It was extremely simple for me to fix the sympy module where I >> > noticed it. I'm not saying it

Re: Learning Python now coming from Perl

2008-12-06 Thread MRAB
Bertilo Wennergren wrote: Aahz wrote: In article <[EMAIL PROTECTED]>, Bertilo Wennergren <[EMAIL PROTECTED]> wrote: I don't suppose there is any introductory material out there that is based on Python 3000 and that is also geared at people with a Perl background? Too early for that I gue

Re: [Python-Dev] "as" keyword woes

2008-12-06 Thread Steven D'Aprano
On Sun, 07 Dec 2008 11:27:56 +1000, Nick Coghlan wrote: > Warren DeLano wrote: >> In other words we have lost the ability to refer to "as" as the >> generalized OOP-compliant/syntax-independent method name for casting: > > Other possible spellings: > > # Use the normal Python idiom for avoiding

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 6:25�pm, Steven D'Aprano <[EMAIL PROTECTED] cybersource.com.au> wrote: > On Sat, 06 Dec 2008 14:36:07 -0800, Mensanator wrote: > > It was extremely simple for me to fix the sympy module where I noticed > > it. I'm not saying it wasn't a problem, I'm saying it wasn't BROKEN. > > If it wasn

Re: Learning Python now coming from Perl

2008-12-06 Thread Bertilo Wennergren
Aahz wrote: In article <[EMAIL PROTECTED]>, Bertilo Wennergren <[EMAIL PROTECTED]> wrote: I don't suppose there is any introductory material out there that is based on Python 3000 and that is also geared at people with a Perl background? Too early for that I guess.. Honestly, the diffe

Re: Guido's new method definition idea

2008-12-06 Thread Jeremiah Dodds
On Fri, Dec 5, 2008 at 9:21 PM, Daniel Fetchinson <[EMAIL PROTECTED] > wrote: > > The proposal is to allow this: > > class C: >def self.method( arg ): >self.value = arg >return self.value > > instead of this: > > class C: >def method( self, arg ): >self.value = arg

Re: Learning Python now coming from Perl

2008-12-06 Thread Python Nutter
> In article <[EMAIL PROTECTED]>, > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > > Well, as an old-time unix hacker (who learned REs long before Perl > existed), my question to you would be, "Is there any problem which > *shouldn't* be solved with an RE?" :-) > > One of the reasons REs don't get u

Re: Learning Python now coming from Perl

2008-12-06 Thread Python Nutter
Perl Cookbook for Python Programmers: http://pleac.sourceforge.net/pleac_python/index.html P3K as starting point (slight cringe) as long as you know the caveats. I'm of the mind as Christopher with regard to how Python 3.0 has been released on Python.org: """I don't think that Python 3.0 is a ba

Re: Guido's new method definition idea

2008-12-06 Thread bearophileHUGS
Erik Max Francis: > your precise proposal has > been brought up countless times on comp.lang.python And something tells me that it will keep coming up many more times in the following years too. Bye, bearophile -- http://mail.python.org/mailman/listinfo/python-list

Re: [Python-Dev] "as" keyword woes

2008-12-06 Thread Nick Coghlan
Warren DeLano wrote: > In other words we have lost the ability to refer to "as" as the > generalized OOP-compliant/syntax-independent method name for casting: Other possible spellings: # Use the normal Python idiom for avoiding keyword clashes # and append a trailing underscore new_object = old_o

Re: Guido's new method definition idea

2008-12-06 Thread Rhodri James
On Sat, 06 Dec 2008 21:51:51 -, Daniel Fetchinson <[EMAIL PROTECTED]> wrote: Did you read the blog post? The advantage is having a less confusing situation for newbies (confusing the number of arguments to a method call). Experience suggests that newbies don't find this confusing, or at

Re: Guido's new method definition idea

2008-12-06 Thread Russ P.
> But it's ugly.  No amount of rationalization will make it not ugly. The dollar sign is ugly? I beg to differ. -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Erik Max Francis
Russ P. wrote: On Dec 6, 4:32 am, Andreas Waldenburger <[EMAIL PROTECTED]> wrote: But that is not the way Python is meant to work. There are several tennets in the Zen of Python that don't chime well with this approach. "self" is a speaking identifier, "$" isn't. Is "@" a "speaking identifier?

Re: Guido's new method definition idea

2008-12-06 Thread Erik Max Francis
Russ P. wrote: Python already uses shorthand extensively. How about "def"? For people who are so worried about self-explanatory symbols, what the heck does that stand for? Default? Defeat? Defect? Defunct? Defer? That's pretty silly; it's pretty obvious that `def` means "define," and even if

Re: python book for non technical absolute beginner

2008-12-06 Thread Rhodri James
On Sat, 06 Dec 2008 13:21:45 -, News123 <[EMAIL PROTECTED]> wrote: No my question does anybody know a nice beginners book (or a learning CD or on line tutorial)? Ideally it shouldn't be too serious and have a lot of small nice mini-examples For just pottering around with, your friend could

Re: "as" keyword woes

2008-12-06 Thread Steven D'Aprano
On Sat, 06 Dec 2008 14:36:07 -0800, Mensanator wrote: > It was extremely simple for me to fix the sympy module where I noticed > it. I'm not saying it wasn't a problem, I'm saying it wasn't BROKEN. If it wasn't broken, why did you need to fix it? "Broken" means "not working", not "unfixable".

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 4:39 pm, "Russ P." <[EMAIL PROTECTED]> wrote: > On Dec 6, 1:21 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > > > > > On Dec 6, 9:12 am, "Russ P." <[EMAIL PROTECTED]> wrote: > > > > On Dec 6, 1:02 am, Antoine De Groote <[EMAIL PROTECTED]> wrote: > > > > > Allowing "$" as a substitute for "se

Re: Learning Python now coming from Perl

2008-12-06 Thread Steven D'Aprano
On Sat, 06 Dec 2008 14:15:28 -0500, Roy Smith wrote: > In article <[EMAIL PROTECTED]>, > Steven D'Aprano <[EMAIL PROTECTED]> wrote: > >> On Sat, 06 Dec 2008 08:50:20 -0500, Roy Smith wrote: >> >> > For your first >> > project, pick something that's small enough that you think you could >> > tac

Re: Rich Comparisons Gotcha

2008-12-06 Thread Robert Kern
Terry Reedy wrote: Rasmus Fogh wrote: Dear All, For the first time I have come across a Python feature that seems completely wrong. After the introduction of rich comparisons, equality comparison does not have to return a truth value, and may indeed return nothing at all and throw an error inst

Re: Guido's new method definition idea

2008-12-06 Thread Steven D'Aprano
On Sat, 06 Dec 2008 08:01:40 -0800, Russ P. wrote: >> -2 on this proposal. > > Did you get two votes in the Presidential election too? 8^) You know, occasionally you stumble across people on the Internet who aren't from the USA. Some of us even speak English almost as good as native speakers *

Re: how to get a beep, OS independent ?

2008-12-06 Thread Rainy
On Dec 6, 3:40 pm, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I want to give a small beep, > for windows there's message-beep, > and there seems to be something like " curses" , > but that package seems to be totally broken in P2.5 for windows. > > Any other suggestions ? > > thanks, > St

Re: how to get a beep, OS independent ?

2008-12-06 Thread MRAB
Stef Mientki wrote: hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like " curses" , but that package seems to be totally broken in P2.5 for windows. Any other suggestions ? print chr(7)? -- http://mail.python.org/mailman/listinfo/python-l

Re: how to get a beep, OS independent ?

2008-12-06 Thread Chris Rebert
On Sat, Dec 6, 2008 at 3:40 PM, Stef Mientki <[EMAIL PROTECTED]> wrote: > hello, > > I want to give a small beep, > for windows there's message-beep, > and there seems to be something like " curses" , > but that package seems to be totally broken in P2.5 for windows. > > Any other suggestions ? Pr

how to get a beep, OS independent ?

2008-12-06 Thread Stef Mientki
hello, I want to give a small beep, for windows there's message-beep, and there seems to be something like " curses" , but that package seems to be totally broken in P2.5 for windows. Any other suggestions ? thanks, Stef Mientki -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Andreas Waldenburger
On Sat, 6 Dec 2008 14:39:34 -0800 (PST) "Russ P." <[EMAIL PROTECTED]> wrote: > I don't know much about Perl, but my understanding is that a dollar > sign must be used every time a variable is dereferenced, as in bash or > other shell languages. What we are proposing here is something > entirely di

Re: Don't you just love writing this sort of thing :)

2008-12-06 Thread Rhodri James
On Sat, 06 Dec 2008 01:20:55 -, Lawrence D'Oliveiro <[EMAIL PROTECTED]> wrote: Do you find this (open, gzip.GzipFile)[Entry.endswith(".gz")](os.path.join(PatchesDir, Entry), "r") complicated or hard to understand? It's made up of very simple pieces, combined according to very simple

Re: Source code generation using Python

2008-12-06 Thread ats
On Dec 6, 11:19 pm, Philip Semanchuk <[EMAIL PROTECTED]> wrote: > On Dec 6, 2008, at 4:47 PM, ats wrote: > > > > > Hello, > > > This is my first posting to a Python group (and I'm starting with > > Python seriously only now) , so bear with me if I make some mistakes. > > > I want to generate 3 diff

Re: [Python-Dev] "as" keyword woes

2008-12-06 Thread Virgil Dupras
On 06 Dec 2008, at 20:38, Warren DeLano wrote: Date: Fri, 05 Dec 2008 22:22:38 -0800 From: Dennis Lee Bieber <[EMAIL PROTECTED]> Subject: Re: "as" keyword woes To: python-list@python.org Message-ID: <[EMAIL PROTECTED]> I'm still in the dark as to what type of data could even inspire t

Re: Guido's new method definition idea

2008-12-06 Thread Benjamin Kaplan
On Sat, Dec 6, 2008 at 4:51 PM, Daniel Fetchinson <[EMAIL PROTECTED] > wrote: > >> Hi folks, > >> > >> The story of the explicit self in method definitions has been > >> discussed to death and we all know it will stay. However, Guido > >> himself acknowledged that an alternative syntax makes perfe

Re: operators as variables

2008-12-06 Thread Mark Tolonen
"macc_200" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] Hi, just starting programming and have an elementary question after playing around with lists but cannot find >the answer with googling. I have a list of variables and I would like some of those variables to be integers and

Re: RELEASED Python 3.0 final

2008-12-06 Thread William McBrine
On Fri, 05 Dec 2008 12:16:47 -0800, Fernando H. Sanches wrote: > I agree that the tab/space thing should be changed. Would it be too hard > to make the parser see if the indentation is consistent in the whole > file? *Something* has changed. I had a piece of code where, without realizing it, I h

Re: Guido's new method definition idea

2008-12-06 Thread Russ P.
On Dec 6, 1:21 pm, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 6, 9:12 am, "Russ P." <[EMAIL PROTECTED]> wrote: > > > > > On Dec 6, 1:02 am, Antoine De Groote <[EMAIL PROTECTED]> wrote: > > > > Allowing "$" as a substitute for "self" wouldn't require this new syntax. > > > > class C: > > >     d

Re: "as" keyword woes

2008-12-06 Thread Mensanator
On Dec 6, 2:09�pm, Wolfgang Strobl <[EMAIL PROTECTED]> wrote: > Mensanator <[EMAIL PROTECTED]>: > > > > > > >On Dec 6, 8:16?am, Wolfgang Strobl <[EMAIL PROTECTED]> wrote: > >> Dennis Lee Bieber <[EMAIL PROTECTED]>: > > >> >On 05 Dec 2008 05:21:25 GMT, Steven D'Aprano > >> ><[EMAIL PROTECTED]> decla

Re: Python 3.0 automatic decoding of UTF16

2008-12-06 Thread John Machin
On Dec 7, 9:01 am, David Bolen <[EMAIL PROTECTED]> wrote: > Johannes Bauer <[EMAIL PROTECTED]> writes: > > This is very strange - when using "utf16", endianness should be detected > > automatically. When I simply truncate the trailing zero byte, I receive: > > Any chance that whatever you used to "

Re: Source code generation using Python

2008-12-06 Thread Philip Semanchuk
On Dec 6, 2008, at 4:47 PM, ats wrote: Hello, This is my first posting to a Python group (and I'm starting with Python seriously only now) , so bear with me if I make some mistakes. I want to generate 3 different versions of a C++ source code, basically injecting different flavours of inline

Re: operators as variables

2008-12-06 Thread News123
Terry Reedy wrote: > macc_200 wrote: >> Hi, >> just starting programming and have an elementary question after >> playing around with lists but cannot find the answer with googling. >> I have a list of variables and I would like some of those variables to >> be integers and some to be operators so

Re: Python 3.0 automatic decoding of UTF16

2008-12-06 Thread David Bolen
Johannes Bauer <[EMAIL PROTECTED]> writes: > This is very strange - when using "utf16", endianness should be detected > automatically. When I simply truncate the trailing zero byte, I receive: Any chance that whatever you used to "simply truncate the trailing zero byte" also removed the BOM at th

Re: Guido's new method definition idea

2008-12-06 Thread Chris Rebert
On Sat, Dec 6, 2008 at 1:33 PM, Carl Banks <[EMAIL PROTECTED]> wrote: > On Dec 5, 8:21 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]> > wrote: >> Hi folks, >> >> The story of the explicit self in method definitions has been >> discussed to death and we all know it will stay. However, Guido >> himself

Re: Guido's new method definition idea

2008-12-06 Thread Daniel Fetchinson
>> Hi folks, >> >> The story of the explicit self in method definitions has been >> discussed to death and we all know it will stay. However, Guido >> himself acknowledged that an alternative syntax makes perfect sense >> and having both (old and new) in a future version of python is a >> possibili

Re: Guido's new method definition idea

2008-12-06 Thread Daniel Fetchinson
> Bad idea having two ways to do this. Pick one or the other! Maybe only this alternative syntax for python 4000? -- Psss, psss, put it down! - http://www.cafepress.com/putitdown -- http://mail.python.org/mailman/listinfo/python-list

Source code generation using Python

2008-12-06 Thread ats
Hello, This is my first posting to a Python group (and I'm starting with Python seriously only now) , so bear with me if I make some mistakes. I want to generate 3 different versions of a C++ source code, basically injecting different flavours of inline assembler depending on target compiler/CPU.

Re: Guido's new method definition idea

2008-12-06 Thread Daniel Fetchinson
>> Hi folks, >> >> The story of the explicit self in method definitions has been >> discussed to death and we all know it will stay. However, Guido >> himself acknowledged that an alternative syntax makes perfect sense >> and having both (old and new) in a future version of python is a >> possibili

Re: "as" keyword woes

2008-12-06 Thread Terry Reedy
Warren DeLano wrote: As someone somewhat knowledgable of how parsers work, I do not understand why a method/attribute name "object_name.as(...)" must necessarily conflict with a standalone keyword " as ". It seems to me that it should be possible to unambiguously separate the two without ambigu

Re: Python 3.0 automatic decoding of UTF16

2008-12-06 Thread John Machin
On Dec 7, 6:20 am, "Mark Tolonen" <[EMAIL PROTECTED]> wrote: > "Johannes Bauer" <[EMAIL PROTECTED]> wrote in message > > news:[EMAIL PROTECTED] > > > > >John Machin schrieb: > >> On Dec 6, 5:36 am, Johannes Bauer <[EMAIL PROTECTED]> wrote: > >>> So UTF-16 has an explicit EOF marker within the text?

Re: Can't get exclusive file lock when safely renaming a file

2008-12-06 Thread Jeffrey Straszheim
Steven D'Aprano wrote: I'm trying to safely rename a file without over-writing any existing files, and I've run into a problem with file locks. Here's a naive way of renaming without over-writing By default on a Linux filesystem, flock() gives you an _advisory_ lock. Other processes can touch

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 5, 8:21 pm, "Daniel Fetchinson" <[EMAIL PROTECTED]> wrote: > Hi folks, > > The story of the explicit self in method definitions has been > discussed to death and we all know it will stay. However, Guido > himself acknowledged that an alternative syntax makes perfect sense > and having both (

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 9:12 am, "Russ P." <[EMAIL PROTECTED]> wrote: > On Dec 6, 1:02 am, Antoine De Groote <[EMAIL PROTECTED]> wrote: > > > > > Allowing "$" as a substitute for "self" wouldn't require this new syntax. > > > class C: > >     def method($, arg): > >         $.value = arg > > > I'm strongly again

first time in the internet history a huge collection of funny pictures and videos over 10000 funny pics and videos download free on mobile format www.funreality.com

2008-12-06 Thread philips
first time in the internet history a huge collection of funny pictures and videos over 1 funny pics and videos download free on mobile format www.funreality.com -- http://mail.python.org/mailman/listinfo/python-list

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 9:15 am, "Russ P." <[EMAIL PROTECTED]> wrote: > On Dec 6, 4:32 am, Andreas Waldenburger <[EMAIL PROTECTED]> wrote: > > > > > On Sat, 6 Dec 2008 04:02:54 -0800 (PST) [EMAIL PROTECTED] wrote: > > > > class C: > > >     def $method(arg): > > >         $value = arg > > > > (Note there's no po

Re: Guido's new method definition idea

2008-12-06 Thread Carl Banks
On Dec 6, 12:47 am, "Patrick Mullen" <[EMAIL PROTECTED]> wrote: > Could I do something like this: > > def a.add(b): return a+b > > Outside of a class?  Of course then that makes you think you could do > 5.add(6) or something crzy like that.  (I mean, you can do > (5).__add__(6) but that's somet

Re: slow Python 3.0 write performance?

2008-12-06 Thread Terry Reedy
Christian Heimes wrote: Istvan Albert wrote: A previous poster suggested that in this case the slowdown is caused by the new io code being written in python rather than C. For text mode Python 3's write() method is slower than Python 2.x's method because all text is encoded. The slowdown is m

Re: Learning Python now coming from Perl

2008-12-06 Thread Carl Banks
On Dec 6, 12:30 pm, Roy Smith <[EMAIL PROTECTED]> wrote: > In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz) > wrote: > > > In article <[EMAIL PROTECTED]>, > > Bertilo Wennergren  <[EMAIL PROTECTED]> wrote: > > > >I don't suppose there is any introductory material out there that is > > >base

Select, interrupted system call, log rotation?

2008-12-06 Thread Rainy
I got an interrupted system call exception in select and I don't know what could have caused it. Here's the error: select.select(inputs, [], [], 9) error: (4, 'Interrupted system call') Caught an exception, shutting down... It's py2.3, on mach architecture. I'm trying to figure out what caus

Re: Learning Python now coming from Perl

2008-12-06 Thread Rainy
On Dec 6, 5:00 am, Bertilo Wennergren <[EMAIL PROTECTED]> wrote: > I'm planning to start learning Python now, using Python 3000. > I have no previous Python skills, but I now Perl pretty well. > I'm also well experienced with JavaScript. > > Any pointers and tips how I should go about getting into

Re: [Python-Dev] "as" keyword woes

2008-12-06 Thread Guido van Rossum
On Sat, Dec 6, 2008 at 11:38 AM, Warren DeLano <[EMAIL PROTECTED]> wrote: [...] > There, I assert that 'object.as(class_reference)' is the simplest and > most elegant generalization of this widely-used convention. Indeed, it > is the only obvious concise answer, if you are limited to using methods

Re: python book for non technical absolute beginner

2008-12-06 Thread Terry Reedy
News123 wrote: One of my 'non technical' friends complained about knowing nothing at all about programming (though using computers regularly for mails / web browsing / googling and downloading / cropping photos ) He wants to play a little with programming to stimulate parts of his otehrwise idl

Re: "as" keyword woes

2008-12-06 Thread Lie
On Dec 7, 2:38 am, "Warren DeLano" <[EMAIL PROTECTED]> wrote: > > Date: Fri, 05 Dec 2008 22:22:38 -0800 > > From: Dennis Lee Bieber <[EMAIL PROTECTED]> > > Subject: Re: "as" keyword woes > > To: [EMAIL PROTECTED] > > Message-ID: <[EMAIL PROTECTED]> > > >    I'm still in the dark as to what type of

Re: "as" keyword woes

2008-12-06 Thread Carl Banks
On Dec 6, 1:38 pm, "Warren DeLano" <[EMAIL PROTECTED]> wrote: > There, I assert that 'object.as(class_reference)' is the simplest and > most elegant generalization of this widely-used convention.  Indeed, it > is the only obvious concise answer, if you are limited to using methods > for casting. I

Re: "as" keyword woes

2008-12-06 Thread Terry Reedy
In my opinion, this thread is a crock of balony. Python *occasionally* adds keywords after giving a warning or requiring a future import in previous versions. In 2.2, one had to 'from __future__ import generators' to make a generator because doing so required the new 'yield' keyword. In 2.3,

Re: Detaching e-mail attachments?

2008-12-06 Thread Terry Reedy
Ken D'Ambrosio wrote: Hi, all. I've done some poking around, and can find roughly two million different ways to attach attachments to an e-mail... but darn few to detach them. Any suggestions? I'm assuming I'm just missing looking in The Right Place, but thus-far, my Googling has been for naug

Re: Rich Comparisons Gotcha

2008-12-06 Thread Terry Reedy
Rasmus Fogh wrote: Dear All, For the first time I have come across a Python feature that seems completely wrong. After the introduction of rich comparisons, equality comparison does not have to return a truth value, and may indeed return nothing at all and throw an error instead. As a result, co

Re: python book for non technical absolute beginner

2008-12-06 Thread Pekka Klärck
2008/12/6 News123 <[EMAIL PROTECTED]>: > No my question does anybody know a nice beginners book (or a learning CD > or on line tutorial)? Ideally it shouldn't be too serious and have a lot > of small nice mini-examples How to Think Like a Computer Scientist - Learning with Python is a good book fo

Re: "as" keyword woes

2008-12-06 Thread Warren DeLano
> Date: Fri, 05 Dec 2008 22:22:38 -0800 > From: Dennis Lee Bieber <[EMAIL PROTECTED]> > Subject: Re: "as" keyword woes > To: python-list@python.org > Message-ID: <[EMAIL PROTECTED]> > > I'm still in the dark as to what type of data could > even inspire the > use of "as" as an object name.

Re: Profiling Python

2008-12-06 Thread Dieter Maurer
[EMAIL PROTECTED] writes on Wed, 3 Dec 2008 07:13:14 -0800 (PST): > To clarify again, > Is there some function like profile.PrintStats() which dynamically > shows the stats before stopping the Profiler? Try to (deep) copy the profiler instance and than call "PrintStats()" on the copy. Of course,

Re: Python 3.0 automatic decoding of UTF16

2008-12-06 Thread Mark Tolonen
"Johannes Bauer" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] John Machin schrieb: On Dec 6, 5:36 am, Johannes Bauer <[EMAIL PROTECTED]> wrote: So UTF-16 has an explicit EOF marker within the text? I cannot find one in original file, only some kind of starting sequence I suppose

Re: Learning Python now coming from Perl

2008-12-06 Thread Roy Smith
In article <[EMAIL PROTECTED]>, Steven D'Aprano <[EMAIL PROTECTED]> wrote: > On Sat, 06 Dec 2008 08:50:20 -0500, Roy Smith wrote: > > > For your first > > project, pick something that's small enough that you think you could > > tackle it in under 50 lines of Perl. > > Is there anything which *c

Re: Learning Python now coming from Perl

2008-12-06 Thread Martin P. Hellwig
News123 wrote: What's more painful is to learn which functianilty is in which library and which library exists. Yes and one mistake I still often find myself doing is, when confronted with a particular problem, that I write some helper code to deal with it. Of course later on I discover tha

Re: operators as variables

2008-12-06 Thread Terry Reedy
macc_200 wrote: Hi, just starting programming and have an elementary question after playing around with lists but cannot find the answer with googling. I have a list of variables and I would like some of those variables to be integers and some to be operators so the list would look something l

Re: Python calling COM compliant .dll

2008-12-06 Thread Gabriel Genellina
En Wed, 03 Dec 2008 16:20:27 -0200, David Shi <[EMAIL PROTECTED]> escribió: I am looking for a concise working example of Python script calling COM compliant .dll. The best source of information is Mark Hammond's book "Python Programming in Win32". The sample chapters available are about

Re: Learning Python now coming from Perl

2008-12-06 Thread Roy Smith
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] (Aahz) wrote: > In article <[EMAIL PROTECTED]>, > Bertilo Wennergren <[EMAIL PROTECTED]> wrote: > > > >I don't suppose there is any introductory material out there that is > >based on Python 3000 and that is also geared at people with a Perl > >b

Re: Learning Python now coming from Perl

2008-12-06 Thread News123
I fully agree with Roy's answer. COding small tasks is a good starting point. For quite some time you'll be of course less efficient than with your previous language, but that's part of the learning curve, isn't it. I guess you'll learn the syntax rather quickly. What's more painful is to learn w

Re: Guido's new method definition idea

2008-12-06 Thread MRAB
Neal Becker wrote: Daniel Fetchinson wrote: Hi folks, The story of the explicit self in method definitions has been discussed to death and we all know it will stay. However, Guido himself acknowledged that an alternative syntax makes perfect sense and having both (old and new) in a future vers

Re: Guido's new method definition idea

2008-12-06 Thread News123
Daniel Fetchinson wrote: > The proposal is to allow this: > > class C: > def self.method( arg ): > self.value = arg > return self.value > > instead of this: > > class C: > def method( self, arg ): > self.value = arg > return self.value Hmm, I'd give the p

Re: Guido's new method definition idea

2008-12-06 Thread Neal Becker
Daniel Fetchinson wrote: > Hi folks, > > The story of the explicit self in method definitions has been > discussed to death and we all know it will stay. However, Guido > himself acknowledged that an alternative syntax makes perfect sense > and having both (old and new) in a future version of pyt

Re: RELEASED Python 3.0 final

2008-12-06 Thread MRAB
Mensanator wrote: On Dec 5, 12:29 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: "Ben Finney" <[EMAIL PROTECTED]> wrote: I hereby recommend “pish and tosh” for use by anyone who wants to counter someone's point. It beats by a country furlong the invective that has become regrettably common

Re: "as" keyword woes

2008-12-06 Thread MRAB
Mensanator wrote: On Dec 6, 8:16�am, Wolfgang Strobl <[EMAIL PROTECTED]> wrote: Dennis Lee Bieber <[EMAIL PROTECTED]>: On 05 Dec 2008 05:21:25 GMT, Steven D'Aprano <[EMAIL PROTECTED]> declaimed the following in comp.lang.python: On Thu, 04 Dec 2008 08:44:19 -0800, Matimus wrote: The point wa

operators as variables

2008-12-06 Thread macc_200
Hi, just starting programming and have an elementary question after playing around with lists but cannot find the answer with googling. I have a list of variables and I would like some of those variables to be integers and some to be operators so the list would look something like [5 * 4 - 4 + 6

Re: Learning Python now coming from Perl

2008-12-06 Thread Aahz
In article <[EMAIL PROTECTED]>, Bertilo Wennergren <[EMAIL PROTECTED]> wrote: > >I don't suppose there is any introductory material out there that is >based on Python 3000 and that is also geared at people with a Perl >background? Too early for that I guess.. Honestly, the differences between 2.x

Re: Guido's new method definition idea

2008-12-06 Thread Tommy Grav
On Dec 6, 2008, at 11:42 AM, [EMAIL PROTECTED] wrote: class ThisIsAClass: def $some_method(arg1, arg2): $value = arg1 + $foo + $bar + $baz * arg2 ... I think my biggest problem with this is what got me off Perl. Add $, together with already used @ and maybe some other identifiers

Re: RELEASED Python 3.0 final

2008-12-06 Thread Mensanator
On Dec 5, 12:29 pm, "Hendrik van Rooyen" <[EMAIL PROTECTED]> wrote: > "Ben Finney" <[EMAIL PROTECTED]> wrote: > >I hereby recommend “pish and tosh” for use by anyone who wants to > >counter someone's point. It beats by a country furlong the invective > >that has become regrettably common here in re

  1   2   >