Re: My python annoyances so far

2007-04-30 Thread Sion Arrowsmith
7stud <[EMAIL PROTECTED]> wrote: >I know what you mean. I always write: > >someStringVar.len > >and then I backspace and retype: > >len(someString). > >But then again, I can never remember whether length is a member or a >method in other languages. ... or whether it's called length, size, count

Re: My python annoyances so far

2007-04-30 Thread Antoon Pardon
On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > Antoon Pardon a écrit : >> On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: >> >>>7stud a écrit : >>> [EMAIL PROTECTED] wrote: >Annoyances: > Every language has annoyances. Python is no exceptio

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
Antoon Pardon a écrit : > On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > >>7stud a écrit : >> >>>[EMAIL PROTECTED] wrote: >>> Annoyances: >>> >>>Every language has annoyances. Python is no exception. >> >>Sure. But we may disagree on what are actually Python's annoyanc

Re: My python annoyances so far

2007-04-27 Thread Antoon Pardon
On 2007-04-27, Bruno Desthuilliers <[EMAIL PROTECTED]> wrote: > 7stud a écrit : >> [EMAIL PROTECTED] wrote: >>> Annoyances: >>> >> >> Every language has annoyances. Python is no exception. > > Sure. But we may disagree on what are actually Python's annoyances !-) That is probably why the subje

Re: My python annoyances so far

2007-04-27 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Well, I'd use ruby but python is everywhere, and ruby isn't. All > the applications that interest me are scriptable in python, not > ruby. Pity that you don't comment core topics. Regards, Björn -- BOFH excuse #289: Interference between the keyboard and the chair.

Re: My python annoyances so far

2007-04-27 Thread flifus
On 26 Apr, 21:50, Bjoern Schliessmann wrote: > > like perhaps ruby. > > If I were rude, I would ask now why you don't use ruby. But I bet > ruby has some annoyances ready for you too. > > Regards, > > Björn > Well, I'd use ruby but python is everywhere, and ruby isn't. All the applications that i

Re: My python annoyances so far

2007-04-27 Thread Bjoern Schliessmann
Steven D'Aprano wrote: > Perhaps you should read about the Kingdom of Nouns: > > execution-in-kingdom-of-nouns.html> Really cool. :) Thanks for sharing the link. Regards, Björn -- BOFH excuse #118: the router thinks its a printer. -- http://mai

Re: My python annoyances so far

2007-04-27 Thread Bjoern Schliessmann
James Stroud wrote: > Here is something on which to meditate: classes become functions > when you get the quantum mechanics just so! s/become/can behave like/ :) Regards, Björn -- BOFH excuse #27: radiosity depletion -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
7stud a écrit : > [EMAIL PROTECTED] wrote: >> Annoyances: >> > > Every language has annoyances. Python is no exception. Sure. But we may disagree on what are actually Python's annoyances !-) > Post away. > Anyone that is offended can go drink a Guinness. > >> 1. Underscores! What's the deal

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
Marc 'BlackJack' Rintsch a écrit : > In <[EMAIL PROTECTED]>, Steven Howe > wrote: > >> And before someone get's all technical, I know everything in Python is >> an 'object' even None, which implies class, or is it the other way around? > > Objects don't imply classes. There are object oriented

Re: My python annoyances so far

2007-04-27 Thread Bruno Desthuilliers
[EMAIL PROTECTED] a écrit : (snip) > > Well, why do some things in the library have to be functions, and > other things have to be class methods? > Why aren't they all just either functions or class methods? like > perhaps ruby. > If I tell you that Python's functions are in fact static method

Re: My python annoyances so far

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, Steven Howe wrote: > And before someone get's all technical, I know everything in Python is > an 'object' even None, which implies class, or is it the other way around? Objects don't imply classes. There are object oriented languages without classes like the Io language.

Re: My python annoyances so far

2007-04-26 Thread Steven D'Aprano
On Thu, 26 Apr 2007 19:36:09 -0700, Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... >> detail you shouldn't care about. Functions that cache the result of long >> time-consuming complications are _good_. > > Not necessarily -- Absolutely -- I didn't mean to imply that

Re: My python annoyances so far

2007-04-26 Thread 7stud
On Apr 26, 9:08 am, Michael Hoffman <[EMAIL PROTECTED]> wrote: > 7stud wrote: > > [EMAIL PROTECTED] wrote: > >> Annoyances: > > > Every language has annoyances. Python is no exception. Post away. > > Anyone that is offended can go drink a Guinness. > > I find Guinness annoying. > -- > Michael Hof

Re: My python annoyances so far

2007-04-26 Thread John Nagle
Alex Martelli wrote: > Steven D'Aprano <[EMAIL PROTECTED]> wrote: >... > >>detail you shouldn't care about. Functions that cache the result of long >>time-consuming complications are _good_. > > > Not necessarily -- > > asse

Re: My python annoyances so far

2007-04-26 Thread Alex Martelli
Steven D'Aprano <[EMAIL PROTECTED]> wrote: ... > detail you shouldn't care about. Functions that cache the result of long > time-consuming complications are _good_. Not necessarily -- asserts the exactly opposite principle, "Do

Re: My python annoyances so far

2007-04-26 Thread James Stroud
Steve Holden wrote: > [EMAIL PROTECTED] wrote: > >> Hi all. I'm learning python these days. I'm going to use this thread >> to post, from time to time, my annoyances with python. I hope someone >> will clarify things to me where I have misunderstood them. >> >> Annoyances: >> 2. There are modules,

Re: My python annoyances so far

2007-04-26 Thread Steven D'Aprano
On Thu, 26 Apr 2007 10:45:22 -0700, Steven Howe wrote: > [EMAIL PROTECTED] wrote: >>> Well, why do some things in the library have to be functions, and >>> other things have to be class methods? >>> > Perhaps because some things are more naturally function like? For > 'instance' (pardon the

Re: My python annoyances so far

2007-04-26 Thread Steven D'Aprano
On Thu, 26 Apr 2007 09:07:03 -0700, flifus wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. Perhaps you should read about the Kingdom of Nouns:

Re: My python annoyances so far

2007-04-26 Thread Paul McGuire
More samples from that thread: fica = Percent(7) fedtax = Percent(15) medicare = Percent(3) deductions = fica + fedtax + medicare gross = 10 net = gross - deductions print net # answer: 75000 wholesale = 10 markup = Percent(35) retail = wholesale + markup print retail # answer: 13.5 yearlyAp

Re: My python annoyances so far

2007-04-26 Thread Paul McGuire
On Apr 26, 1:22 pm, Jean-Paul Calderone <[EMAIL PROTECTED]> wrote: > On 26 Apr 2007 20:05:45 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote: > > > > > > >On 2007-04-26, Steven Howe <[EMAIL PROTECTED]> wrote: > >> [EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be func

Re: My python annoyances so far

2007-04-26 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Hi. You wrote c++, didn't you? Yes :) But I mostly don't anymore and ported my main project from C++ to Python. > Well, why do some things in the library have to be functions, and > other things have to be class methods? Easy. Some things abstractly operate on all kin

Re: My python annoyances so far

2007-04-26 Thread Fuzzyman
On Apr 25, 11:50 pm, [EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! What's the de

Re: My python annoyances so far

2007-04-26 Thread Kay Schluehr
On Apr 26, 6:07 pm, [EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. A good question. Part of the answer might be that their ar

Re: My python annoyances so far

2007-04-26 Thread Kay Schluehr
On Apr 26, 6:07 pm, [EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. A good question. Part of the answer might be that their ar

Re: My python annoyances so far

2007-04-26 Thread Jean-Paul Calderone
On 26 Apr 2007 20:05:45 +0200, Neil Cerutti <[EMAIL PROTECTED]> wrote: >On 2007-04-26, Steven Howe <[EMAIL PROTECTED]> wrote: >> [EMAIL PROTECTED] wrote: Well, why do some things in the library have to be functions, and other things have to be class methods? >> >> Perhaps because some thi

Re: My python annoyances so far

2007-04-26 Thread Neil Cerutti
On 2007-04-26, Steven Howe <[EMAIL PROTECTED]> wrote: > [EMAIL PROTECTED] wrote: >>> Well, why do some things in the library have to be functions, >>> and other things have to be class methods? > > Perhaps because some things are more naturally function like? > For 'instance' (pardon the pun), func

Re: My python annoyances so far

2007-04-26 Thread Marc 'BlackJack' Rintsch
In <[EMAIL PROTECTED]>, flifus wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? > > Why aren't they all just either functions or class methods? like > perhaps ruby. To which class should `sorted()` belong to then? Or the functio

Re: My python annoyances so far

2007-04-26 Thread Steven Howe
[EMAIL PROTECTED] wrote: >> Well, why do some things in the library have to be functions, and >> other things have to be class methods? >> Perhaps because some things are more naturally function like? For 'instance' (pardon the pun), functions shouldn't retain data. They perform an operation

Re: My python annoyances so far

2007-04-26 Thread Michael Hoffman
[EMAIL PROTECTED] wrote: > Well, why do some things in the library have to be functions, and > other things have to be class methods? They don't have to be. They just are. That's like asking why do some functions start with the letters a-m, and others with n-z. Why can't they all begin with a-m

Re: My python annoyances so far

2007-04-26 Thread flifus
On 26 Apr, 12:00, Bjoern Schliessmann wrote: > [EMAIL PROTECTED] wrote: > > Hi all. I'm learning python these days. I'm going to use this > > thread to post, from time to time, my annoyances with python. I > > hope someone will clarify things to me where I have misunderstood > > them. > > > Annoya

Re: My python annoyances so far

2007-04-26 Thread Michael Hoffman
7stud wrote: > [EMAIL PROTECTED] wrote: >> Annoyances: >> > > Every language has annoyances. Python is no exception. Post away. > Anyone that is offended can go drink a Guinness. I find Guinness annoying. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: My python annoyances so far

2007-04-26 Thread 7stud
[EMAIL PROTECTED] wrote: > Annoyances: > Every language has annoyances. Python is no exception. Post away. Anyone that is offended can go drink a Guinness. > 1. Underscores! What's the deal with that? Especially those double > underscores. The best answer I read on this is that the double > und

Re: My python annoyances so far

2007-04-26 Thread Steve Holden
[EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! What's the deal with that? Espec

Re: My python annoyances so far

2007-04-26 Thread Bjoern Schliessmann
[EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this > thread to post, from time to time, my annoyances with python. I > hope someone will clarify things to me where I have misunderstood > them. > > Annoyances: > > 1. Underscores! What's the deal with that? Es

Re: My python annoyances so far

2007-04-25 Thread Steven D'Aprano
On Wed, 25 Apr 2007 15:50:53 -0700, flifus wrote: > > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! Wha

Re: My python annoyances so far

2007-04-25 Thread James Stroud
[EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. Please start a new thread for each annoyance. Overuse of a single thread is an annoyance to a great many people. > I hope someone > will clar

Re: My python annoyances so far

2007-04-25 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! What's the deal with that? Espec

Re: My python annoyances so far

2007-04-25 Thread Diez B. Roggisch
[EMAIL PROTECTED] schrieb: > Hi all. I'm learning python these days. I'm going to use this thread > to post, from time to time, my annoyances with python. I hope someone > will clarify things to me where I have misunderstood them. > > Annoyances: > > 1. Underscores! What's the deal with that? Esp

My python annoyances so far

2007-04-25 Thread flifus
Hi all. I'm learning python these days. I'm going to use this thread to post, from time to time, my annoyances with python. I hope someone will clarify things to me where I have misunderstood them. Annoyances: 1. Underscores! What's the deal with that? Especially those double underscores. The be