logging

2006-11-12 Thread [EMAIL PROTECTED]
Hi all ! How to remove a logger ? There si no logging.removeLogger(name) method. I've a lot of objects that create loging. When objects are destroyed, associated logger are not. This create memory leak... Thanks for any idea. -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 3000 idea -- + on iterables -> itertools.chain

2006-11-12 Thread Fredrik Lundh
George Sakkis wrote: > The base object class would be one candidate, similarly to the way > __nonzero__ is defined to use __len__, or __contains__ to use __iter__. > > Alternatively, iter() could be a wrapper type (or perhaps mixin) > instead of a function, something like: so you're proposing to

Re: boost::python embedding example running error

2006-11-12 Thread Roman Yakovenko
On 12 Nov 2006 19:10:24 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I use boost 1.33_1, there's an example on boost::python named > embedding.cpp. When I tried to build and run it in visual studio 2005, > I got an error on this line: > > std::string hello() { return python::call_method(se

Re: how do i map this?

2006-11-12 Thread Ben Finney
"John Machin" <[EMAIL PROTECTED]> writes: > Ben Finney wrote: > > You're printing a string, and never using that 'row' parameter. > > If that is so, why is he getting that message "TypeError: format > requires a mapping"? No idea. Probably because what the poster showed us is not code that shows

Re: how do i map this?

2006-11-12 Thread John Machin
ronrsr wrote: > I think I am passing the wrong argument to the Print_row routine: Well, yes, that is what the error message is telling you. It is also what Fredrik Lundh told you only a couple of hours ago. He also told you what to do to fix it, at a high level. Below is my attempt to explain at

Re: how do i map this?

2006-11-12 Thread Gabriel G
At Monday 13/11/2006 01:55, John Machin wrote: Ben Finney wrote: > "ronrsr" <[EMAIL PROTECTED]> writes: > > > #row is a dictionary with keys: zid, keywords, citation, quotation > > def print_row(row): > >print """ > > [...] > > """ > > You're printing a string, and never using th

Re: how do i map this?

2006-11-12 Thread John Machin
Ben Finney wrote: > "ronrsr" <[EMAIL PROTECTED]> writes: > > > #row is a dictionary with keys: zid, keywords, citation, quotation > > def print_row(row): > >print """ > > %(keywords)s > > > > %(quotation)s > > > > %(citation)s > > > >> name="updat

Re: how do i map this?

2006-11-12 Thread Ben Finney
"ronrsr" <[EMAIL PROTECTED]> writes: > #row is a dictionary with keys: zid, keywords, citation, quotation > def print_row(row): >print """ > %(keywords)s > > %(quotation)s > > %(citation)s > >name="updateform" enctype="application/x-www-form-urlen

how do i map this?

2006-11-12 Thread ronrsr
I think I am passing the wrong argument to the Print_row routine: Traceback (most recent call last): File "index.py", line 91, in ? zhtml.print_row(record) File "/usr/www/users/homebase/realprogress/zingers/zhtml.py", line 154, in pri nt_row print """ TypeError: format requires a map

boost::python embedding example running error

2006-11-12 Thread could . net
I use boost 1.33_1, there's an example on boost::python named embedding.cpp. When I tried to build and run it in visual studio 2005, I got an error on this line: std::string hello() { return python::call_method(self, "hello"); } It's a back ptr error. I don't know where to ask this question so I

Re: Python 3000 idea -- + on iterables -> itertools.chain

2006-11-12 Thread George Sakkis
Fredrik Lundh wrote: > John Reese wrote: > > > It seems like it would be clear and mostly backwards compatible if the > > + operator on any iterables created a new iterable that iterated > > throught first its left operand and then its right, in the style of > > itertools.chain. > > you do know th

article on Python 2.5 features

2006-11-12 Thread Beliavsky
A Parade of New Features Debuts in Python 2.5 by Gigi Sayfan "Python 2.5 still has the smell of fresh paint but it's the perfect time to drill down on the most important new features in this comprehensive release. Read on for detailed explanations and examples of exception handling, resource manage

Re: Python 3000 idea -- + on iterables -> itertools.chain

2006-11-12 Thread Fredrik Lundh
John Reese wrote: > It seems like it would be clear and mostly backwards compatible if the > + operator on any iterables created a new iterable that iterated > throught first its left operand and then its right, in the style of > itertools.chain. you do know that "iterable" is an informal interf

Re: Why does this code crash python?

2006-11-12 Thread Scott David Daniels
[EMAIL PROTECTED] wrote: >... >>> if float(seconds[0]) < 10: seconds[0] = '0' + >>> seconds[0][:-1] >>> if float(seconds[1]) < 10: seconds[1] = '0' + >>> seconds[1][:-1]I've not handled leading 0s on the seconds field (I >>> tried, but can't >> figure out how to sp

Python 3000 idea -- + on iterables -> itertools.chain

2006-11-12 Thread John Reese
It seems like it would be clear and mostly backwards compatible if the + operator on any iterables created a new iterable that iterated throught first its left operand and then its right, in the style of itertools.chain. This would allow summation of generator expressions, among other things, to h

Re: reduce to be removed?

2006-11-12 Thread George Sakkis
Dustan wrote: > Alright, I can see I'm a bit outvoted here. I tried your suggestions > and it worked fine. > > I'll also try to consider in the future that part of the problem might > be lack of information conveyed on my part. If you insist on one-liners, it can be done without sum(), though it

Re: format requires a mapping?

2006-11-12 Thread Fredrik Lundh
ronrsr wrote: > what is python trying to tell me here? does it have to do with > formatting the string. > > Keywords and Zinger are fields in my database. > > print """ > Keywords > Zinger > > > > > > TypeError: format requires a mapping portions of your code and the traceback ap

format requires a mapping?

2006-11-12 Thread ronrsr
what is python trying to tell me here? does it have to do with formatting the string. Keywords and Zinger are fields in my database. print """ Keywords Zinger TypeError: format requires a mapping thanks much in advance, -rsr- -- http://mail.python.org/mailman/listinfo/pytho

Re: explicit self revisited

2006-11-12 Thread Fredrik Lundh
> I suppose that in his view, language advocacy is a zero-sum game, so > positive comments about Python can be considered as FUD against his own > project. He's even invented his own del.icio.us tag for this purpose: > > http://del.icio.us/tag/pythonfud now at: http://del.icio.us/t

Re: Find interface associated with default route?

2006-11-12 Thread Giovanni Bajo
Neal Becker wrote: > A quick strace reveals that 'route' just reads /proc/net/route, so: > > def get_default_if(): > f = open ('/proc/net/route', 'r') > for line in f: > words = string.split (line) > dest = words[1] > try: > if (int (dest) == 0): >

Re: Random image text generation?

2006-11-12 Thread Leif K-Brooks
Ben Finney wrote: > Leif K-Brooks <[EMAIL PROTECTED]> writes: > >> Steven D'Aprano wrote: >>> For a text only solution, consider putting up a natural language >>> question >> That wouldn't work as a true CAPTCHA (Completely Automated *Public* >> Turing test to tell Computers and Humans Apart), si

Re: Random image text generation?

2006-11-12 Thread Ben Finney
[EMAIL PROTECTED] writes: > Is there a module out there that will generate an image with a random text > string such as the confirmation images you see on various websites? The W3C recommends more-accessible alternatives to vision-based CAPTCHAs: http://www.w3.org/TR/turingtest/> -- \

Re: numpy/scipy: correlation

2006-11-12 Thread sturlamolden
While I am at it, lets add the bootstrap estimate of the standard error as well. from numpy import mean, std, sum, sqrt, sort, corrcoef, tanh, arctanh from numpy.random import randint def bootstrap_correlation(x,y): idx = randint(len(x),size=(1000,len(x))) bx = x[idx] by = y[idx]

Re: Random image text generation?

2006-11-12 Thread Ben Finney
Leif K-Brooks <[EMAIL PROTECTED]> writes: > Steven D'Aprano wrote: > > For a text only solution, consider putting up a natural language > > question such as: > > > > What is the third letter of 'national'? > > What is four plus two? > > How many eggs in a dozen? > > Fill in the blank: Mary had a

Re: numpy/scipy: correlation

2006-11-12 Thread sturlamolden
robert wrote: > > t = r * sqrt( (n-2)/(1-r**2) ) > yet too lazy/practical for digging these things from there. You obviously got > it - out of that, what would be a final estimate for an error range of r (n > big) ? > that same "const. * (1-r**2)/sqrt(n)" which I found in that other document ?

Re: numpy/scipy: correlation

2006-11-12 Thread Robert Kern
robert wrote: > I remember once I saw somewhere a formula for an error range of the corrcoef. > but cannot find it anymore. There is no such thing as "a formula for an error range" in a vacuum like that. Each formula has a model attached to it. If your data does not follow that model, then any

Re: Random image text generation?

2006-11-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > Another possibility is to run the submissions through SpamBayes and silently > direct any which score as "unsure" or "spam" to me for review. Users > wouldn't even need to know their submissions were being scrutinized. there's also: http://akismet.com/ python in

Re: numpy/scipy: correlation

2006-11-12 Thread Robert Kern
sturlamolden wrote: > Robert Kern wrote: > >> The difference between the two models is that the first places no >> restrictions >> on the distribution of x. The second does; both the x and y marginal >> distributions need to be normal. Under the first model, the correlation >> coefficient has no

Re: Random image text generation?

2006-11-12 Thread skip
Steven> Keep in mind two serious problems with captchas: Steven> - they're impossible for the blind or people using text-only Steven> browsers to see -- even mere colour blindness can make some Steven> captchas impossible to solve; Steven> - sometimes they're too difficul

Re: Random image text generation?

2006-11-12 Thread Leif K-Brooks
Steven D'Aprano wrote: > For a text only solution, consider putting up a natural language question > such as: > > What is the third letter of 'national'? > What is four plus two? > How many eggs in a dozen? > Fill in the blank: Mary had a little its fleece was white as snow. > Cat, Dog, Apple

Re: Random image text generation?

2006-11-12 Thread Steven D'Aprano
On Sun, 12 Nov 2006 14:56:49 -0600, skip wrote: > > >> Is there a module out there that will generate an image with a random > >> text string such as the confirmation images you see on various > >> websites? > > Mitja> They're called captcha images or captchas for short. Googlin

Re: numpy/scipy: correlation

2006-11-12 Thread Ramon Diaz-Uriarte
On 11/12/06, robert <[EMAIL PROTECTED]> wrote: > Robert Kern wrote: > > robert wrote: (...) > One would expect the error range to drop simply with # of points. Yet it > depends more complexly on the mean value of the coef and on the distribution > at all. > More interesting realworld cases: For

Re: Random image text generation?

2006-11-12 Thread skip
>> Is there a module out there that will generate an image with a random >> text string such as the confirmation images you see on various >> websites? Mitja> They're called captcha images or captchas for short. Googling Mitja> for "python captcha" returns several hits; see w

Close program built with py2exe

2006-11-12 Thread Steve Ingram
Found out what I'd done, and it wasn't py2exe causug the problem. I wasn't closing the main dialog properly, I was calling Close() instead of Destroy(), so the dialog stayed in memory, basically it was still running. Thanks for your help, steve -Original Message- From: Fredrik Lundh [ma

Re: Random image text generation?

2006-11-12 Thread Jorge Godoy
[EMAIL PROTECTED] writes: > Is there a module out there that will generate an image with a random text > string such as the confirmation images you see on various websites? I'm > thinking I'm going to have to add that to the forms on the Mojam websites. > Over the past couple weeks we've begun to

Re: Random image text generation?

2006-11-12 Thread Mitja Trampus
[EMAIL PROTECTED] wrote: > Is there a module out there that will generate an image with a random text > string such as the confirmation images you see on various websites? They're called captcha images or captchas for short. Googling for "python captcha" returns several hits; see what you like...

Random image text generation?

2006-11-12 Thread skip
Is there a module out there that will generate an image with a random text string such as the confirmation images you see on various websites? I'm thinking I'm going to have to add that to the forms on the Mojam websites. Over the past couple weeks we've begun to get lots of spam submission crap.

Re: numpy/scipy: correlation

2006-11-12 Thread robert
sturlamolden wrote: > First, are you talking about rounding error (due to floating point > arithmetics) or statistical sampling error? About measured data. rounding and sampling errors with special distrutions are neglegible. Thus by default assuming gaussian noise in x and y. (This may explain

Re: MemoryError

2006-11-12 Thread Fredrik Lundh
Bugra Cakir wrote: > Within a Python program how can we avoid getting "MemoryError" problem ? since you still haven't told us what your program is doing, and where in the program you're getting the error, it's a bit hard to tell. -- http://mail.python.org/mailman/listinfo/python-list

MemoryError

2006-11-12 Thread Bugra Cakir
Hi,Within a Python program how can we avoid getting "MemoryError" problem ? -- http://mail.python.org/mailman/listinfo/python-list

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Carsten Haese
On Sat, 2006-11-11 at 23:18 -0800, Doug wrote: > Michael Hobbs wrote: > > I think the colon could be omitted from every type of compound > > statement: 'if', 'for', 'def', 'class', whatever. Am I missing anything? > > > > Thanks, > > - Mike > > It is a very good idea as the colon is technically re

Re: How to choose the right GUI toolkit ?

2006-11-12 Thread John Henry
Nice example. Jussi Salmela wrote: > John Henry wrote: > > BTW: I did a search and found the testnotebook example from: > > > > http://prdownloads.sourceforge.net/pythoncard/testNotebook.zip?download > > > > and tried it out. There is one error in the widget.py that I have to > > get around. Ch

Re: explicit self revisited

2006-11-12 Thread Fredrik Lundh
Carsten Haese wrote: > According to that definition, FUD is "a sales or marketing strategy of > disseminating negative (and vague) information on a competitor's > product." Doug "cheddar cheese" Holton (who has a long history of posting seriously confused and/or abusive stuff under a number of a

Re: numpy/scipy: correlation

2006-11-12 Thread sturlamolden
First, are you talking about rounding error (due to floating point arithmetics) or statistical sampling error? If you are talking about the latter, I suggest you look it up in a statistics text book. E.g. if x and y are normally distributed, then t = r * sqrt( (n-2)/(1-r**2) ) has a Student t-d

Re: Fredrik Lundh [was "Re: explicit self revisited"]

2006-11-12 Thread Carsten Haese
On Sat, 2006-11-11 at 23:14 -0800, Doug wrote: > Fredrik Lundh wrote: > > Doug wrote: > >> > >> Fredrik Lundh wrote: > >>> Fredrik Lundh wrote: > >>> > cannot all you clueless trolls who cannot think of a single useful thing > >>> > to contribute to Python start your own newsgroup? > >> > >>> and b

Re: Python component model

2006-11-12 Thread sturlamolden
[EMAIL PROTECTED] wrote: > Having never used java or .NET I'm not sure what you're looking for. There is a whole generation of computer users out there scared stiff of using the keyboard. Soon, computers will not have a keyboard at all. The trend is perhaps more pronounced among managers not wri

Re: writing wx code in emacs - how to make easier?

2006-11-12 Thread Diez B. Roggisch
> I would like to write wx code in emacs. For now I'm using python-mode > but I hope they are stuff which make it easier. I mean some > autocompletion or abbrevs of such things as wx.ALIGN* wx.EVT_* ... Create a TAGS-file using e.g. find -type f | xargs -L1 etags --append Then use the emacs co

Re: numpy/scipy: correlation

2006-11-12 Thread robert
robert wrote: > Robert Kern wrote: > http://links.jstor.org/sici?sici=0162-1459(192906)24%3A166%3C170%3AFFPEOC%3E2.0.CO%3B2-Y > > > tells: > probable error of r = 0.6745*(1-r**2)/sqrt(N) > > A simple function of r and N - quite what I expected above roughly for > the N-only dep.. But thus it

Re: reduce to be removed?

2006-11-12 Thread Dustan
Alright, I can see I'm a bit outvoted here. I tried your suggestions and it worked fine. I'll also try to consider in the future that part of the problem might be lack of information conveyed on my part. -- http://mail.python.org/mailman/listinfo/python-list

Re: numpy/scipy: correlation

2006-11-12 Thread sturlamolden
Robert Kern wrote: > The difference between the two models is that the first places no restrictions > on the distribution of x. The second does; both the x and y marginal > distributions need to be normal. Under the first model, the correlation > coefficient has no meaning. That is not correct.

Re: numpy/scipy: correlation

2006-11-12 Thread robert
Robert Kern wrote: > robert wrote: >> Is there a ready made function in numpy/scipy to compute the correlation >> y=mx+o of an X and Y fast: >> m, m-err, o, o-err, r-coef,r-coef-err ? > > And of course, those three parameters are not particularly meaningful > together. > If your model is truly

Re: Python Parallel Paradigm

2006-11-12 Thread Paul Boddie
Sandy wrote: > > A higher-level system of concurrency, not based on monitors and > locks and great programmer discipline, will ultimately require making > "Python 3000" a reality. It would surprise me if Python 3000 introduced anything substantially more than what Python 2.x provides in the ar

Re: service windows avec py2exe

2006-11-12 Thread Tim Golden
DarkPearl wrote: > ok, > > It's this line who crash the service : > > self.WMIService > =win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") > > > why this function goes when it is not a service? > > with IDLE -> ok > with py2exe executable (no windows service) -

Re: range syntax

2006-11-12 Thread Cameron Laird
In article <[EMAIL PROTECTED]>, Colin J. Williams <[EMAIL PROTECTED]> wrote: . . . >Your point about iterators is well taken, but it seems that the range is >used sufficiently frequently that some syntactic form would be helpf

Help with gateway

2006-11-12 Thread Cameron Laird
Who knows and/or manages bag.python.org? My e-mail server and the clp gateway are having a configuration disagreement that I'd like to solve. Please e-mail me privately. I'll report back to the group as appropriate. -- http://mail.python.org/mailman/listinfo/python-list

Re: python(abi)

2006-11-12 Thread Fredrik Lundh
Ioannis Vranos wrote: > [EMAIL PROTECTED] download]# rpm -ivh > wxPython-common-gtk2-unicode-2.6.3.3-fc4_py2.4.i386.rpm > error: Failed dependencies: > python(abi) = 2.4 is needed by > wxPython-common-gtk2-unicode-2.6.3.3-fc4_py2.4.i386 > > I have found in some message logs, that it is

writing wx code in emacs - how to make easier?

2006-11-12 Thread Seweryn Kokot
Hello, I would like to write wx code in emacs. For now I'm using python-mode but I hope they are stuff which make it easier. I mean some autocompletion or abbrevs of such things as wx.ALIGN* wx.EVT_* ... Any ideas? regards, SK -- http://mail.python.org/mailman/listinfo/python-list

Re: Find interface associated with default route?

2006-11-12 Thread Neal Becker
Neal Becker wrote: > Fredrik Lundh wrote: > >> Neal Becker wrote: >> >>> Any thoughts on howto find the interface associated with the default >>> route (this is on linux)? >> >> are you sure you sent this to the right newsgroup ? >> >> is this what you want ? >> >> >>> import os >> >>> for

python(abi)

2006-11-12 Thread Ioannis Vranos
OS: Scientific Linux 4.4 (http://www.scientificlinux.org) which is a Red Hat Enterprise Linux 4 derivative (http://www.redhat.com/rhel/), like CentOS (http://www.centos.org), White Box Linux (http://www.whiteboxlinux.org) etc. Python version built and installed from sources: 2.4.4. I am tryi

Re: service windows avec py2exe

2006-11-12 Thread DarkPearl
ok, It's this line who crash the service : self.WMIService =win32com.client.GetObject(r"winmgmts:{impersonationLevel=impersonate}!\\.\root\cimv2") why this function goes when it is not a service? with IDLE -> ok with py2exe executable (no windows service) -> ok with py2exe service option true

Re: FAQ: How do I calculate what quoted strings and numbers mean?

2006-11-12 Thread Fredrik Lundh
[EMAIL PROTECTED] wrote: > But those objections miss the point. Having had those troubles > explained to me now, I'm still leaving my code unchanged - it still > does what I mean. That is, > > eval(source, {'builtins': {}}) works enough like an evaluator of > literals to let you duck the work o

Re: Close program built with py2exe

2006-11-12 Thread Fredrik Lundh
Steve Ingram wrote: > I've got a problem with a program I've written and want to distribute. It > uses a wxPython dialog and I've built a distribution version with py2exe. > Problem is when I run the .exe under windows I can only stop the program > completely using the task manager. When I close t

Re: Why does this code crash python?

2006-11-12 Thread Martin Blume
<[EMAIL PROTECTED]> schrieb > I am trying to make a program that will basically simulate > a chess clock in python. ... > ... it crashes shortly after. Can't help you on why it crashes, but > > class eventMonitor (Thread): > def run ( self ): > [snipped] > if e

Re: Find interface associated with default route?

2006-11-12 Thread Neal Becker
Fredrik Lundh wrote: > Neal Becker wrote: > >> Any thoughts on howto find the interface associated with the default >> route (this is on linux)? > > are you sure you sent this to the right newsgroup ? > > is this what you want ? > > >>> import os > >>> for line in os.popen("/sbin/route"): >

Re: Python component model

2006-11-12 Thread Jacob Hallen
In article <[EMAIL PROTECTED]>, Peter Wang <[EMAIL PROTECTED]> wrote: ... >functions at ever higher levels of abstraction, or to have a >proliferation of nebulously-defined "manager" objects.) IMHO once you >cross this chasm and are able to model your problem domain with live >objects that go off

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Hendrik van Rooyen
"Dan Lenski" <[EMAIL PROTECTED]> wrote: > Hendrik van Rooyen wrote: > > "Fredrik Lundh" <[EMAIL PROTECTED]> wrote: > > > > 8<--- > > > >>> color = "blue" > > > >>> if color == "red" or "green" or "yellow": > > > ... print color, "is red or gre

Re: Fredrik Lundh [was "Re: explicit self revisited"]

2006-11-12 Thread Alan G Isaac
On Sun, 12 Nov 2006 02:14:32 -0500, Doug <[EMAIL PROTECTED]> wrote: > I was going to link to > a definition of FUD to show I really meant to use that term. Oooh. If you had just mentioned your dyslogia, it would have saved us all some time. Thanks! Alan -- http://mail.python.org/mailman/listinfo/

Re: Find interface associated with default route?

2006-11-12 Thread Fredrik Lundh
Neal Becker wrote: > Any thoughts on howto find the interface associated with the default route > (this is on linux)? are you sure you sent this to the right newsgroup ? is this what you want ? >>> import os >>> for line in os.popen("/sbin/route"): ... line = line.split() ... if line[

Find interface associated with default route?

2006-11-12 Thread Neal Becker
Any thoughts on howto find the interface associated with the default route (this is on linux)? -- http://mail.python.org/mailman/listinfo/python-list

ANN: version 3.9.2 of eric3 available

2006-11-12 Thread Detlev Offenbach
Hi, this is to informe you about the availability of eric3 v 3.9.2. This is bug fix release with some new features. It is available via http://www.die-offenbachs.de/detlev/eric.html Changelog: - bug fixes - added support for new QScintilla stuff (e.g. autocomplete from document and APIs) - ex

Re: Decimal() instead of float?

2006-11-12 Thread Steven D'Aprano
On Sun, 12 Nov 2006 20:38:31 +1100, Ben Finney wrote: > But you try to tell people overseas about this legislation, and they > just don't believe you. Ha! You were lucky. When I was a lad, we had to write our postcodes on envelopes in balanced ternary. -- Steven. -- http://mail.python.org/ma

Re: explicit self revisited

2006-11-12 Thread Duncan Booth
Dennis Lee Bieber <[EMAIL PROTECTED]> wrote: > On Sun, 12 Nov 2006 01:55:35 +0100, Fredrik Lundh ><[EMAIL PROTECTED]> declaimed the following in comp.lang.python: > > >> >> ah, good point. I've updated the FAQ. >> > Ah, but do we dare update the Wikipedia link to include Python as a > lan

Re: Decimal() instead of float?

2006-11-12 Thread John Machin
Steven D'Aprano wrote: > On Sun, 12 Nov 2006 02:31:04 +0100, Fredrik Lundh wrote: > > >> For example, I have a ZIP code > >> database that can do some processing on its numbers, and the numbers are > >> stored as floating point values (exactly) but Python doesn't get them > >> right > > > > sounds

Re: Py3K idea: why not drop the colon?

2006-11-12 Thread Doug
Michael Hobbs wrote: > Can anyone find a flaw with this change in syntax? > > Instead of dividing a compound statement with a colon, why not divide it > on a newline? For example, the colon could be dropped from this statement: > if self.hungry: > self.eat() > to > if self.hungry >

Fredrik Lundh [was "Re: explicit self revisited"]

2006-11-12 Thread Doug
Fredrik Lundh wrote: > Doug wrote: >> >> Fredrik Lundh wrote: >>> Fredrik Lundh wrote: >>> > cannot all you clueless trolls who cannot think of a single useful thing >>> > to contribute to Python start your own newsgroup? >> >>> and before anyone complains; please note that they're working through

Python as default Lexer in SciTE

2006-11-12 Thread egbert
Is it possible to set Python as the default language in SciTE? Not all my python scripts have the .py extension, only the to_be_imported ones. And I use SciTE only for Python. e. -- Egbert Bouwman - Keizersgracht 197 II - 1016 DS Amsterdam - 020 6257991 ==

Re: Decimal() instead of float?

2006-11-12 Thread Ben Finney
"Steven D'Aprano" <[EMAIL PROTECTED]> writes: > On Sun, 12 Nov 2006 02:31:04 +0100, Fredrik Lundh wrote: > > (who uses fractional ZIP codes, btw?) > > Well, I can't speak for Americans, but here in Australia we > typically give our post codes to six decimal places: > > Melbourne 3000.00 > Brun

Re: reduce to be removed?

2006-11-12 Thread Ben Finney
"Dustan" <[EMAIL PROTECTED]> writes: > Steven D'Aprano wrote: > > Repeat after me: > > > > "Not everything has to be a one-liner." > > Not everything has to be a one-liner. But readability helps. Indeed. Complex one-liners are rarely as readable as a well-named function call, implemented with sev