Re: I'm a python addict !

2009-01-28 Thread afriere
On Jan 27, 4:52 am, Paul McGuire pt...@austin.rr.com wrote: [snip]     # how you have to do it in C++ and Java     # light = light.next_state()     # using Python     light.__class__ = light.next_state I'm sure you can, but why poke yourself in the eye with a blunt stick? ;) IMO there are

Re: I'm a python addict !

2009-01-27 Thread Bruno Desthuilliers
Paul McGuire a écrit : On Jan 26, 10:54 am, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote: Want to change the type/behavior of an object from class A to class B? How about this: aobj = A() aobj.__class__ = B Try *that* in as

Re: I'm a python addict !

2009-01-26 Thread J Kenneth King
Linuxguy123 linuxguy...@gmail.com writes: I just started using python last week and I'm addicted. I hate Perl. I never did learn to use it with any competence. I has to be the most obfuscated, cryptic language I've ever seen. Making it object oriented only makes it worse ! .. snip .. I

Re: I'm a python addict !

2009-01-26 Thread J Kenneth King
J Kenneth King ja...@agentultra.com writes: Linuxguy123 linuxguy...@gmail.com writes: I just started using python last week and I'm addicted. I hate Perl. I never did learn to use it with any competence. I has to be the most obfuscated, cryptic language I've ever seen. Making it object

Re: I'm a python addict !

2009-01-26 Thread J. Cliff Dyer
On Mon, 2009-01-26 at 14:43 -0800, J Kenneth King wrote: Linuxguy123 linuxguy...@gmail.com writes: I just started using python last week and I'm addicted. I hate Perl. I never did learn to use it with any competence. I has to be the most obfuscated, cryptic language I've ever seen.

Re: I'm a python addict !

2009-01-26 Thread J. Cliff Dyer
On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote: Want to change the type/behavior of an object from class A to class B? How about this: aobj = A() aobj.__class__ = B Try *that* in as simple-looking C++ or Java! Wow. That looks very powerful and fun. But scary. Any

Re: I'm a python addict !

2009-01-26 Thread Paul McGuire
On Jan 26, 10:54 am, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote: Want to change the type/behavior of an object from class A to class B?  How about this:     aobj = A()     aobj.__class__ = B Try *that* in as simple-looking C++ or

Re: I'm a python addict !

2009-01-26 Thread Scott David Daniels
J. Cliff Dyer wrote: On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote: ... How about this: aobj = A() aobj.__class__ = B ... Wow. That looks very powerful and fun. But scary. Any thoughts on how you would use that in a way that wouldn't unleash sulphurous code smells? Seems

Re: I'm a python addict !

2009-01-26 Thread J. Cliff Dyer
On Mon, 2009-01-26 at 09:52 -0800, Paul McGuire wrote: On Jan 26, 10:54 am, J. Cliff Dyer j...@sdf.lonestar.org wrote: On Fri, 2009-01-23 at 20:25 -0800, Paul McGuire wrote: Want to change the type/behavior of an object from class A to class B? How about this: aobj = A()

Re: I'm a python addict !

2009-01-26 Thread Paul McGuire
On Jan 26, 2:06 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: Thanks.  That makes sense.  But your example creates a new instance of the new class each time, rather than changing the class of a persistent instance, as the original example, to which I was responding, did. Look closer. The

Re: I'm a python addict !

2009-01-26 Thread J. Cliff Dyer
On Mon, 2009-01-26 at 12:37 -0800, Paul McGuire wrote: On Jan 26, 2:06 pm, J. Cliff Dyer j...@sdf.lonestar.org wrote: Thanks. That makes sense. But your example creates a new instance of the new class each time, rather than changing the class of a persistent instance, as the original

Re: I'm a python addict !

2009-01-25 Thread Andreas Waldenburger
On Sat, 24 Jan 2009 23:53:17 + MRAB goo...@mrabarnett.plus.com wrote: Terry Reedy wrote: For a Python 'program', see http://xkcd.com/534/ It doesn't follow PEP 8! So Randall can just forget about getting xkcd in the Standard Library. Let this be an example to all of you­! /W -- My

Re: I'm a python addict !

2009-01-24 Thread Lie Ryan
On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote: I just started using python last week and I'm addicted. you need to try this: import antigravity http://xkcd.com/353/ -- http://mail.python.org/mailman/listinfo/python-list

Re: I'm a python addict !

2009-01-24 Thread Benjamin Kaplan
On Sat, Jan 24, 2009 at 5:35 PM, Lie Ryan lie.1...@gmail.com wrote: On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote: I just started using python last week and I'm addicted. you need to try this: import antigravity http://xkcd.com/353/ Just be careful with that. That guy was

Re: I'm a python addict !

2009-01-24 Thread Terry Reedy
Benjamin Kaplan wrote: On Sat, Jan 24, 2009 at 5:35 PM, Lie Ryan lie.1...@gmail.com mailto:lie.1...@gmail.com wrote: On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote: I just started using python last week and I'm addicted. you need to try this: import antigravity

Re: I'm a python addict !

2009-01-24 Thread MRAB
Terry Reedy wrote: Benjamin Kaplan wrote: On Sat, Jan 24, 2009 at 5:35 PM, Lie Ryan lie.1...@gmail.com mailto:lie.1...@gmail.com wrote: On Fri, 23 Jan 2009 19:58:09 -0700, Linuxguy123 wrote: I just started using python last week and I'm addicted. you need to try this:

Re: I'm a python addict !

2009-01-24 Thread Robert Kern
On 2009-01-23 22:25, Aahz wrote: In articlemailman.7865.1232765899.3487.python-l...@python.org, Linuxguy123linuxguy...@gmail.com wrote: I just started using python last week and I'm addicted. Welcome! Just be aware that excessive Perl-bashing is considered somewhat tasteless on this

Re: I'm a python addict !

2009-01-24 Thread Russ P.
On Jan 24, 4:03 pm, Robert Kern robert.k...@gmail.com wrote: On 2009-01-23 22:25, Aahz wrote: In articlemailman.7865.1232765899.3487.python-l...@python.org, Linuxguy123linuxguy...@gmail.com  wrote: I just started using python last week and I'm addicted. Welcome!  Just be aware that

I'm a python addict !

2009-01-23 Thread Linuxguy123
I just started using python last week and I'm addicted. I hate Perl. I never did learn to use it with any competence. I has to be the most obfuscated, cryptic language I've ever seen. Making it object oriented only makes it worse ! While I am at it, I dislike bash shell programming too.

Re: I'm a python addict !

2009-01-23 Thread Paul McGuire
On Jan 23, 8:58 pm, Linuxguy123 linuxguy...@gmail.com wrote: I just started using python last week and I'm addicted. snip youthful exuberance I see a lot of Python in my future. Bravo, welcome, and well-said! Your sentiments mirror and resonate with those of many on this list. About 6

Re: I'm a python addict !

2009-01-23 Thread Aahz
In article mailman.7865.1232765899.3487.python-l...@python.org, Linuxguy123 linuxguy...@gmail.com wrote: I just started using python last week and I'm addicted. Welcome! Just be aware that excessive Perl-bashing is considered somewhat tasteless on this newsgroup, but the occasional snide

Re: I'm a python addict !

2009-01-23 Thread Russ P.
On Jan 23, 6:58 pm, Linuxguy123 linuxguy...@gmail.com wrote: I will never write another Perl or Bash script again. I still use bash for orchestrating the execution of a series of other scripts and/or programs (including python programs). I know you can do that in python, but I find bash simpler