Re: my favorite line of py code so far

2013-11-10 Thread Peter Cacioppi
Chris said : I think map is fine if you can use a named function, but if you can't come up with a descriptive name for what you're doing, a comprehension is probably better (as it'll have the code right there). Mapping _ across everything tells you nothing about what it's actually doing OK, this

Re: my favorite line of py code so far

2013-11-10 Thread Peter Cacioppi
Sorry, typo, meant to say To be clear, I was never really intending to keep the _ = lambda c : lambda x : c(*x) map(_(P), zip([1,2,3], [6, 5, 4])) code snippets in my final work product. The purpose of this thread was too fish around for ideas on what to replace it with... --

Re: my favorite line of py code so far

2013-11-10 Thread Chris Angelico
On Sun, Nov 10, 2013 at 7:57 PM, Peter Cacioppi peter.cacio...@gmail.com wrote: Chris said : I think map is fine if you can use a named function, but if you can't come up with a descriptive name for what you're doing, a comprehension is probably better (as it'll have the code right there).

Re: my favorite line of py code so far

2013-11-10 Thread Peter Cacioppi
Chris said : Absolutely! The unfortunate truth, though, is that idioms that resonate with you _and nobody else_ are just as big a problem as bugs, because they're unmaintainable. So hopefully what you're doing will make sense to other people too! There is some truth in what you say ... but in

Re: my favorite line of py code so far

2013-11-09 Thread Peter Cacioppi
Peter Otten said: _ = lambda c: lambda x: c(*x) list(map(_(P), zip([1,2,3], [6, 5, 4]))) [Point(x=1, y=6), Point(x=2, y=5), Point(x=3, y=4)] ? While the obvious approach would be [P(*args) for args in zip([1,2,3], [6, 5, 4])] [Point(x=1, y=6), Point(x=2, y=5), Point(x=3, y=4)] I

Re: my favorite line of py code so far

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 8:23 PM, Peter Cacioppi peter.cacio...@gmail.com wrote: I sometimes use map, sometimes comprehensions. I suspect other people do the same, that's why the language supports map and comprehensions. I think map is fine if you can use a named function, but if you can't come

Re: my favorite line of py code so far

2013-11-09 Thread Paul Rubin
Peter Cacioppi peter.cacio...@gmail.com writes: [P(*args) for args in zip([1,2,3], [6, 5, 4])] [P(x,y) for x,y in zip(...)] Are you saying it's always preferable to avoid map? Not always. Depends on context, partly subjective. I sometimes use map, sometimes comprehensions. I suspect other

Re: my favorite line of py code so far

2013-11-09 Thread Peter Otten
Peter Cacioppi wrote: Peter Otten said: _ = lambda c: lambda x: c(*x) list(map(_(P), zip([1,2,3], [6, 5, 4]))) [Point(x=1, y=6), Point(x=2, y=5), Point(x=3, y=4)] ? While the obvious approach would be [P(*args) for args in zip([1,2,3], [6, 5, 4])] [Point(x=1, y=6), Point(x=2,

Re: my favorite line of py code so far

2013-11-09 Thread Stefan Behnel
Peter Otten, 09.11.2013 12:49: There is no obvious meaning attached to _ -- so don't use it. Not quite true. Depending on the context, the obvious meanings of _ in Python are either 1) ignore me, e.g. in _, b = some_tuple or 2) this is a non-public thing, as in class Xyz:

Re: my favorite line of py code so far

2013-11-09 Thread Chris Angelico
On Sat, Nov 9, 2013 at 11:41 PM, Stefan Behnel stefan...@behnel.de wrote: 2) this is a non-public thing, as in class Xyz: _private = 1 Your three meanings all have the etymology of ignore me, but I would distinguish this one from the others. An underscore used on its own has

Re: my favorite line of py code so far

2013-11-09 Thread Peter Otten
Stefan Behnel wrote: Peter Otten, 09.11.2013 12:49: There is no obvious meaning attached to _ -- so don't use it. Not quite true. Depending on the context, the obvious meanings of _ in Python are either 1) ignore me, e.g. in _, b = some_tuple or 2) this is a non-public

my favorite line of py code so far

2013-11-08 Thread Peter Cacioppi
my fav so far is this _ = lambda c : lambda x : c(*x) c can be any calleable and x any iterable, but I tend to use it with a class, and then map _(class) over the result of a zip. It must be in the library somewhere, but I haven't found it. I'm never sure what to call it, so I just reroll

Re: my favorite line of py code so far

2013-11-08 Thread Chris Angelico
On Sat, Nov 9, 2013 at 9:22 AM, Peter Cacioppi peter.cacio...@gmail.com wrote: my fav so far is this _ = lambda c : lambda x : c(*x) c can be any calleable and x any iterable, but I tend to use it with a class, and then map _(class) over the result of a zip. It must be in the library

Re: my favorite line of py code so far

2013-11-08 Thread Peter Cacioppi
Chris said: So... for any given class, it returns a tweaked version that unpacks an iterable of its arguments instead of taking separate args. It works with any calleable (not just any class), but otherwise your summary is spot on. Interesting, perhaps, but not something that'll be needed in

Re: my favorite line of py code so far

2013-11-08 Thread Peter Otten
Peter Cacioppi wrote: my fav so far is this _ = lambda c : lambda x : c(*x) c can be any calleable and x any iterable, but I tend to use it with a class, and then map _(class) over the result of a zip. It must be in the library somewhere, but I haven't found it. I'm never sure what

Re: My newbie annoyances so far

2007-05-06 Thread Alex Martelli
stdin -- etc, etc; I tried making things fair by placing the same limitations on each implementation (also forcing Python to use stdin, etc). I'm sure my Javascript code can be made much better, but here is what I have so far, as a.js: var vowels_re = /[aeiou]/gi; var conson_re

Re: My newbie annoyances so far

2007-05-06 Thread John Nagle
Alex Martelli wrote: John Nagle [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Apr 27, 9:07 am, John Nagle [EMAIL PROTECTED] wrote: The CPython implementation is unreasonably slow compared to good implementations of other dynamic languages such as LISP and JavaScript. Why do you

Re: My newbie annoyances so far

2007-05-06 Thread Alex Martelli
John Nagle [EMAIL PROTECTED] wrote: ... The CPython implementation is unreasonably slow compared to good implementations of other dynamic languages such as LISP and JavaScript. ... Tamarin is a just-in-time compiler for Javascript. ...and is not yet released, as far as I can tell;

Re: My newbie annoyances so far

2007-05-06 Thread Isaac Gouy
On May 6, 6:09 pm, John Nagle [EMAIL PROTECTED] wrote: Alex Martelli wrote: John Nagle [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Apr 27, 9:07 am, John Nagle [EMAIL PROTECTED] wrote: The CPython implementation is unreasonably slow compared to good implementations of other

Re: My newbie annoyances so far

2007-05-06 Thread Neil Hodgson
Alex Martelli: Can you run a generic benchmark inside the current implementation of Flash to check out its Javascript performance? I can't, so, ... I can't either (without going to a lot of effort) so here is a page comparing SpiderMonkey and Tamarin from someone with an adobe.com

Re: My newbie annoyances so far

2007-05-06 Thread John Nagle
Isaac Gouy wrote: On May 6, 6:09 pm, John Nagle [EMAIL PROTECTED] wrote: Alex Martelli wrote: John Nagle [EMAIL PROTECTED] wrote: [EMAIL PROTECTED] wrote: On Apr 27, 9:07 am, John Nagle [EMAIL PROTECTED] wrote: The CPython implementation is unreasonably slow compared to good implementations

Re: My newbie annoyances so far

2007-05-06 Thread Alex Martelli
Neil Hodgson [EMAIL PROTECTED] wrote: Alex Martelli: Can you run a generic benchmark inside the current implementation of Flash to check out its Javascript performance? I can't, so, ... I can't either (without going to a lot of effort) so here is a page comparing SpiderMonkey and

Re: My newbie annoyances so far

2007-05-05 Thread igouy2
On Apr 27, 9:07 am, John Nagle [EMAIL PROTECTED] wrote: The CPython implementation is unreasonably slow compared to good implementations of other dynamic languages such as LISP and JavaScript. Why do you say CPython is slower than JavaScript? Please provide examples. --

Re: My newbie annoyances so far

2007-05-05 Thread John Nagle
[EMAIL PROTECTED] wrote: On Apr 27, 9:07 am, John Nagle [EMAIL PROTECTED] wrote: The CPython implementation is unreasonably slow compared to good implementations of other dynamic languages such as LISP and JavaScript. Why do you say CPython is slower than JavaScript? Please provide

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 exception. Sure. But we may disagree on what

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 or len. Or

Re: My newbie annoyances so far

2007-04-29 Thread Bjoern Schliessmann
Steven D'Aprano wrote: There are bad programmers in every language, but RPL conditional blocks aren't the cause of them. Once you learn how RPL works, if statements work consistently and obviously (although maybe not to programmers who don't get RP notation). ACK. What made me anwswer wasn't

Re: My newbie annoyances so far

2007-04-28 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Bjoern Schliessmann wrote: Dennis Lee Bieber wrote: HP RPL made more sense: b if c [else d] end Please explain. HP RPL: b if c [else d] end Python: b if c else d What's the more sense here? The HP RPL leaves even more questions. If the square brackets mean

Re: My newbie annoyances so far

2007-04-28 Thread Steven D'Aprano
On Sat, 28 Apr 2007 06:57:54 +, Dennis Lee Bieber wrote: On Fri, 27 Apr 2007 22:39:25 +0200, Bjoern Schliessmann [EMAIL PROTECTED] declaimed the following in comp.lang.python: Dennis Lee Bieber wrote: And I'll probably ignore those expressions whenever I do get around to 2.5+...

Re: My newbie annoyances so far

2007-04-28 Thread Bjoern Schliessmann
Dennis Lee Bieber wrote: You didn't take account of what b, c, and d were... RPL: condition if truth else false end Python: truth if condition else false (RPL is a somewhat common reference to the stack based language of the later calculators -- HP48, for instance)

Re: My newbie annoyances so far

2007-04-28 Thread Gary Duzan
In article [EMAIL PROTECTED], John Nagle [EMAIL PROTECTED] wrote: (P.S. PEP 3117 is a joke, right?) I expect so, especially given its creation date. Gary Duzan Motorola CHS --

Re: My newbie annoyances so far

2007-04-28 Thread Steven D'Aprano
On Sat, 28 Apr 2007 10:58:25 +0200, Bjoern Schliessmann wrote: Dennis Lee Bieber wrote: You didn't take account of what b, c, and d were... RPL: condition if truth else false end Python: truth if condition else false (RPL is a somewhat common reference to the

Re: My python annoyances so far

2007-04-27 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-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 methods of

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 languages

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 with that?

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 Bjoern Schliessmann
Steven D'Aprano wrote: Perhaps you should read about the Kingdom of Nouns: http://steve-yegge.blogspot.com/2006/03/ 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. --

Re: My python annoyances so far

2007-04-27 Thread flifus
On 26 Apr, 21:50, Bjoern Schliessmann usenet- [EMAIL PROTECTED] 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

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 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 subject says: my

My newbie annoyances so far

2007-04-27 Thread Paul McGuire
Python is not VB and Python is not Java and Python is not Ruby and Python is not any other language that is not Python. 1. Functions cannot be called without the parens (like in VB) 2. Python uses some naming conventions as programmer cues, such as leading and trailing double-underscores to

Re: My newbie annoyances so far

2007-04-27 Thread John Nagle
Paul McGuire wrote: Python is not VB and Python is not Java and Python is not Ruby and Python is not any other language that is not Python. As someone who's written in too many programming languages over a long career, I'm quite pleased with Python as a programming language. It's

Re: My newbie annoyances so far

2007-04-27 Thread Michael Hoffman
John Nagle wrote: (P.S. PEP 3117 is a joke, right?) Note date of creation. -- Michael Hoffman -- http://mail.python.org/mailman/listinfo/python-list

Re: My newbie annoyances so far

2007-04-27 Thread John Nagle
Dennis Lee Bieber wrote: On 27 Apr 2007 08:34:42 -0700, Paul McGuire [EMAIL PROTECTED] declaimed the following in comp.lang.python: deficient - ternary expressions are now part of the language after years of refugees from C and C++ asking how to write a = b ? c : d, and now they'll get to

Re: My newbie annoyances so far

2007-04-27 Thread Paul McGuire
On Apr 27, 12:42 pm, John Nagle [EMAIL PROTECTED] wrote: Dennis Lee Bieber wrote: On 27 Apr 2007 08:34:42 -0700, Paul McGuire [EMAIL PROTECTED] declaimed the following in comp.lang.python: deficient - ternary expressions are now part of the language after years of refugees from C and C++

Re: My newbie annoyances so far

2007-04-27 Thread Bjoern Schliessmann
Dennis Lee Bieber wrote: And I'll probably ignore those expressions whenever I do get around to 2.5+... That syntax, in my mind, just... stinks... HP RPL made more sense: b if c [else d] end Please explain. HP RPL: b if c [else d] end Python: b if c else d What's the more sense here?

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 annoyances !-) That is probably

Re: My python annoyances so far

2007-04-26 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! What's the

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?

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? Especially

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

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 flifus
On 26 Apr, 12:00, Bjoern Schliessmann usenet- [EMAIL PROTECTED] 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

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 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 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 functions in

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), functions

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 things are more

Re: My python annoyances so far

2007-04-26 Thread Kay Schluehr
be that their are no abstract base classes / interfaces in the language so far. These have a particular meaning and you might ask whether some object has certain abilities like being sizable. With ABCs or interfaces it feels natural to implement abstract methods in subclasses. Without them you can either add methods ad

Re: My python annoyances so far

2007-04-26 Thread Kay Schluehr
be that their are no abstract base classes / interfaces in the language so far. These have a particular meaning and you might ask whether some object has certain abilities like being sizable. With ABCs or interfaces it feels natural to implement abstract methods in subclasses. Without them you can either add methods ad

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 deal

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 kind

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 functions, and other

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

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 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 pun),

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, there are

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 -- http://blogs.msdn.com/oldnewthing/archive/2004/12/20/327369.aspx asserts the exactly opposite principle, Don't

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 -- http://blogs.msdn.com/oldnewthing/archive/2004/12/20/327369.aspx asserts the exactly

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 Hoffman lol. --

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

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

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?

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? Especially

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 clarify

figuring out how much data was sent so far via XML-RPC?

2006-03-06 Thread Ratko Jagodic
I am currently using XML-RPC for a very convenient quick-and-dirty way of sending some files (base64 encoded). The files can be bigger sometimes (10-20mb) and I was wondering if there is a way to see how much data was sent already and how much still needs to be sent (like a progress bar). I would

Re: figuring out how much data was sent so far via XML-RPC?

2006-03-06 Thread Fredrik Lundh
Ratko Jagodic wrote: I am currently using XML-RPC for a very convenient quick-and-dirty way of sending some files (base64 encoded). The files can be bigger sometimes (10-20mb) and I was wondering if there is a way to see how much data was sent already and how much still needs to be sent

this where I am so far !

2005-12-19 Thread Marian
Any one who have a clue how can I add and remove records from a list. if the record is dictionary type) This the program I am working on. I have no idea how can I remove and add some more courses ! import cPickle, shelve def write_file(): CIT101 = ["Academic Computer Skills"]

So far

2005-10-06 Thread CppNewB
I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an emphasis on simplification. My only complaint is that there doesn't appear to be a great commercial IDE for the language. I've tried Komodo, etc and they are nice applications, but they don't

Re: So far

2005-10-06 Thread UrsusMaximus
Try PythonCard Ron Stephens Python Learning Center a prententious name for a nice hobbyist resource www.awaretek.com/plf.html -- http://mail.python.org/mailman/listinfo/python-list

Re: So far

2005-10-06 Thread UrsusMaximus
Try PythonCard Ron Stephens Python Learning Center a prententious name for a nice hobbyist resource www.awaretek.com/plf.html -- http://mail.python.org/mailman/listinfo/python-list

Re: So far

2005-10-06 Thread Benji York
CppNewB wrote: Most of them have support for Dialogs, but what about more complex UI's? I may need a resizable frame within a resizable frame? I haven''t found a GUI builder with a great feel yet. I *highly* recommend wxDesigner. I've used it extensively. It's cheap and has a demo version

Re: So far

2005-10-06 Thread Christophe
CppNewB a écrit : I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an emphasis on simplification. My only complaint is that there doesn't appear to be a great commercial IDE for the language. I've tried Komodo, etc and they are nice

RE: So far

2005-10-06 Thread Bell, Kevin
:[EMAIL PROTECTED] On Behalf Of Christophe Sent: Thursday, October 06, 2005 9:50 AM To: python-list@python.org Subject: Re: So far CppNewB a écrit : I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an emphasis on simplification. My only complaint

Re: So far

2005-10-06 Thread Michael Schneider
Take a look at: http://wingware.com/ It is only $35.00 for an IDE. (30 day free eval version) I use eclipse for java, and have become quite fond of tab completion. Mike CppNewB wrote: I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an

Re: So far

2005-10-06 Thread bruno modulix
CppNewB wrote: I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an emphasis on simplification. My only complaint is that there doesn't appear to be a great commercial IDE Why commercial ? -- bruno desthuilliers python -c print

Re: So far

2005-10-06 Thread Jaime Wyant
On 10/6/05, CppNewB [EMAIL PROTECTED] wrote: I am absolutely loving my experience with Python. Even vs. Ruby, the syntax feels very clean with an emphasis on simplification. Yes. We all love python, welcome aboard! My only complaint is that there doesn't appear to be a great commercial IDE

Re: So far

2005-10-06 Thread Jaime Wyant
On 10/6/05, Bell, Kevin [EMAIL PROTECTED] wrote: I like pythonWin other than the white background where you write your scripts, because after awhile it's bad on the eyes. Does anyone know of a free IDE that will allow control of this, as well as the coloring of keywords, etc? xemacs will

Re: So far (about editing tools)

2005-10-06 Thread Kenneth McDonald
This is something I fought with for a long time. My overwhelming vote is Eclipse with the PyDev plugin. (Google search should reveal this). Here are the pros and cons. 1) Eclipse is a _big_ system, with a strong emphasis on Java. So there's a lot of functionality you need to learn to

Re: So far (about editing tools)

2005-10-06 Thread Micah Elliott
On Oct 06, Kenneth McDonald wrote: The only _real_ problem is the eclipse learning curve. The only real *advantage* of Eclipse (over other suggested tools) is its highly hyped automatic refactoring. Admittedly, I have not used it for Python development, but I'm skeptical of the feasibility of

Re: So far (about editing tools)

2005-10-06 Thread Paul Rubin
Micah Elliott [EMAIL PROTECTED] writes: Furthermore, Eclipse requires java and is thusly not provided on any linux distro I'm familiar with, which I consider a huge roadblock. And as mentioned, it's bloated. It comes with Fedora Core 4 and is compiled with gcj. I would suspect that the

Re: So far (about editing tools)

2005-10-06 Thread Kenneth McDonald
As I did mention in my original post, Eclipse is indeed bloated. However, in spite of that, I've found it both fast and reliable (much to surprise). The only real problem is learning what functionality (the majority) to ignore. PyDev offers nice integration with Python. If I run a python

Re: So far (about editing tools)

2005-10-06 Thread Michael Ekstrand
On Thursday 06 October 2005 15:45, Micah Elliott wrote: On Oct 06, Kenneth McDonald wrote: The only _real_ problem is the eclipse learning curve. The only real *advantage* of Eclipse (over other suggested tools) is its highly hyped automatic refactoring. Admittedly, I have not used it for