Re: Tkinter question

2010-04-23 Thread eb303
On Apr 22, 5:55 pm, Rotwang wrote: > James Mills wrote: > > On Wed, Apr 21, 2010 at 8:45 PM, Rotwang wrote: > > >> [...] > > >>From reading the documentation myself (pydoc)... > > > It would seem your only option is to make a thread > > out of this (not my preferred way - I was hoping it was > >

Re: question about an exciting gotcha for unittests (and elsewhere) ...

2010-04-23 Thread Cameron Simpson
On 23Apr2010 16:15, I wrote: | On 23Apr2010 15:37, I wrote: | | class Backend(object): | | def serialise(self, value): | | ''' Convert a value for external string storage. | | ''' | | if isinstance(value, Node): [...] | | return ":%s:%s" % (value.type, value.name) |

Re: Linux servers, network and file names

2010-04-23 Thread Rebelo
Infinity77 wrote: Hi All, I apologize in advance if this sounds like a stupid question but I am really no expert at all in network things, and I may be looking in the wrong direction altogether. At work we have a bunch of Linux servers, and we can connect to them with our Windows PCs over a net

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-23 Thread Bryan
Steven D'Aprano wrote: > John Nagle wrote: > >    Is "nlargest" smart enough to decide when it's cheaper to track the > > N largest entries on a linear pass through the list than to sort? It *always* does a linear pass through the list (linear, that is in the length of the entire list). It tracks

question about an exciting gotcha for unittests (and elsewhere) ...

2010-04-23 Thread Cameron Simpson
I've run into a problem unittesting something I'm writing. I have a little node tracking class I'm using to track items and attributes. An item is a "Node" object, and the collection is a "NodeDB". So I'm writing some unittests, thus: class Node(dict): [...] class NodeDB(dic): [...] class

Re: Linux servers, network and file names

2010-04-23 Thread Martin P. Hellwig
On 04/22/10 15:13, Infinity77 wrote: For me: //SERVER/gavana/Folder/FileName.txt Colleague: //SERVER/Colleague/Folder/FileName.txt So, no matter what I do, the file name stored in the database is user- dependent and not universal and common to all of us. If that user dependent part happens t

Smtpd module

2010-04-23 Thread Johny
I would like to use smtpd module to write very simple smtp server but this server must: 1. accept several connections at the same time( like a forking server) 2. have basic authentication that is it must understand AUTH command. Does anyone know if the smtpd module have both? Thanks Ba. -- htt

Re: Calling multiple programs with subprocess

2010-04-23 Thread Bryan
amit asked: > How does one go about calling multiple programs using subprocess? > > This is the program flow: > > C:\> wrenv.exe > C:\> make clean > .. > > The 'wrenv.exe' is necessary since it sets up the proper environment > for building. How do I use subprocess to execute 'wrenv.exe' and then >

Making special method names, work with __getattr__

2010-04-23 Thread Antoon Pardon
The following is a proof of concept. The idea is to have variables that represent symbolic names/expressions, you can work with like ordinary values, but that can be evaluated later. This is the code: import operator from f

Re: when should I explicitly close a file?

2010-04-23 Thread Adam Tauno Williams
On Fri, 2010-04-23 at 16:29 +1200, Lawrence D'Oliveiro wrote: > In message , Chris > Rebert wrote: > > On Wed, Apr 21, 2010 at 5:53 PM, Lawrence D'Oliveiro wrote: > >> In message <4bc9aad...@dnews.tpgi.com.au>, Lie Ryan wrote: > >>> Since in python nothing is guaranteed about implicit file close .

FW: help req debugging

2010-04-23 Thread sanam singh
hi, i am using wingware to debug python.however i also want to debug my c modules which have been called in my python script simultaneously. so i have followed instructions given on http://www.wingware.com/doc/howtos/debugging-extension-modules-on-linux . as a result i launch my python

Re: when should I explicitly close a file?

2010-04-23 Thread Alf P. Steinbach
* Adam Tauno Williams: On Fri, 2010-04-23 at 16:29 +1200, Lawrence D'Oliveiro wrote: In message , Chris Rebert wrote: On Wed, Apr 21, 2010 at 5:53 PM, Lawrence D'Oliveiro wrote: In message <4bc9aad...@dnews.tpgi.com.au>, Lie Ryan wrote: Since in python nothing is guaranteed about implicit fil

Re: question about an exciting gotcha for unittests (and elsewhere) ...

2010-04-23 Thread Peter Otten
Cameron Simpson wrote: > and it's failing. I've traced the failure cause, ending up with this > assertion message from the end of serialise() above: > > AssertionError: HOST:foo:{}'cs.nodedb.node.Node'> > > Experienced users will see at once what's happened: I've made a Node > myself in t

Re: Windows debugging symbols for python 2.5.4 and pywin32 214

2010-04-23 Thread Alexandre Fayolle
On Friday 23 April 2010 08:36:01 Mark Hammond wrote: > On 22/04/2010 7:23 AM, Alexandre Fayolle wrote: > > Hi everyone, > > > > I have a production server running a Windows Service written in Python, > > which uses python 2.5.4 (yes I know it is old, but I am somewhat stuck > > with this for now) a

Re: Tkinter question

2010-04-23 Thread Rotwang
eb303 wrote: On Apr 22, 5:55 pm, Rotwang wrote: [...] From my experience, mixing Tkinter with threads is a bad idea. As most GUI toolkits, it really doesn't like to be manipulated from different threads, so you might end up getting weird problems or even crashes. By the way, did you try to

Re: question about an exciting gotcha for unittests (and elsewhere) ...

2010-04-23 Thread Cameron Simpson
On 23Apr2010 13:25, Peter Otten <__pete...@web.de> wrote: | Cameron Simpson wrote: | > and it's failing. I've traced the failure cause, ending up with this | > assertion message from the end of serialise() above: | > | > AssertionError: HOST:foo:{}'cs.nodedb.node.Node'> | > | > Experienced

ANN: eGenix mxODBC Zope Database Adapter 2.0.1

2010-04-23 Thread eGenix Team: M.-A. Lemburg
ANNOUNCEMENT mxODBC Zope Database Adapter Version 2.0.1 for Zope and the Plone CMS Available for Zope 2.12 and later on Windows,

py3 tkinter Text accepts what bytes?

2010-04-23 Thread Matthias Kievernagel
Hello, I stumbled upon this one while porting some of my programs to Python 3.1. The program receives messages from a socket and displays them in a tkinter Text. Works fine in Python 2 and Python 3.1. The problems arrived when I wanted to know the details... First surprise: Text.insert accepts no

Re: Linux servers, network and file names

2010-04-23 Thread Infinity77
Hi Martin & All, On Apr 23, 9:50 am, "Martin P. Hellwig" wrote: > On 04/22/10 15:13, Infinity77 wrote: > > > > For me:  //SERVER/gavana/Folder/FileName.txt > > Colleague: //SERVER/Colleague/Folder/FileName.txt > > > So, no matter what I do, the file name stored in the database is user- > > depend

Re: how does a queue stop the thread?

2010-04-23 Thread Steve
On Apr 21, 6:08 pm, kaiix wrote: > A simple thread pool example. My question is, since *MyThread.run* > will loop endless, how does the thread know the time to quit? how does > the *queue* notify the thread? is there any shared variables, like a > *lock*? > > When I set daemon false, it stays in t

Re: Tkinter question

2010-04-23 Thread eb303
On Apr 23, 1:58 pm, Rotwang wrote: > eb303 wrote: > > On Apr 22, 5:55 pm, Rotwang wrote: > > >> [...] > > > From my experience, mixing Tkinter with threads is a bad idea. As most > > GUI toolkits, it really doesn't like to be manipulated from different > > threads, so you might end up getting wei

Re: py3 tkinter Text accepts what bytes?

2010-04-23 Thread eb303
On Apr 23, 2:00 pm, Matthias Kievernagel wrote: > Hello, > > I stumbled upon this one while porting some of my programs > to Python 3.1. The program receives messages from a socket > and displays them in a tkinter Text. Works fine in Python 2 > and Python 3.1. The problems arrived when I wanted to

"SEXY CAMRON" "SEXY PRETTY CAMERON" "SEXY HOT HOLLYWOOD STARS" "HOT HOLLYWWOD CELEBERITIES" "SEXY HOLLYWOOD GIRLS" "SEXY BIKINI GIRLS" "SEXY CHINESE GIRLS" "SEXY PAKISTANI GIRLS" "SEXY INDIAN GIRLS"

2010-04-23 Thread Naeem
"SEXY CAMRON" "SEXY PRETTY CAMERON" "SEXY HOT HOLLYWOOD STARS" "HOT HOLLYWWOD CELEBERITIES" "SEXY HOLLYWOOD GIRLS" "SEXY BIKINI GIRLS" "SEXY CHINESE GIRLS" "SEXY PAKISTANI GIRLS" "SEXY INDIAN GIRLS" on http://hollywood6y.blogspot.com/"SEXY CAMRON" "SEXY PRETTY CAMERON" "SEXY HOT HOLLYW

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-23 Thread Grant Edwards
On 2010-04-22, D'Arcy J.M. Cain wrote: > On Thu, 22 Apr 2010 15:04:01 +0100 > Tim Golden wrote: >> > So please tell me if there is one or not. I really need this soon. >> > Appreciate a lot. >> >> Assuming top-k doesn't mean something obscurely statistical: > > You really shouldn't do people's h

Difficulty w/json keys

2010-04-23 Thread Red
My apologies for what is probably a simple question to most on this group. However, I am new to python and very new to json. I am trying to read in a json file from a twitter download. There are, generally, two types of lines: those lines with "text" and the other lines. I am only interested in t

font change

2010-04-23 Thread Vikram Moule
Q1. I want to change the font of the menu . I want to write the menu items like "File" in my native language.I was successful writing the text in the window in my font. But I am not able to write the menu items in same font. In fact I am not able to find how to change the font of the menu. I am usi

Re: py3 tkinter Text accepts what bytes?

2010-04-23 Thread Matthias Kievernagel
eb303 wrote: > On Apr 23, 2:00 pm, Matthias Kievernagel > wrote: >> Hello, >> >> I stumbled upon this one while porting some of my programs >> to Python 3.1. The program receives messages from a socket >> and displays them in a tkinter Text. Works fine in Python 2 >> and Python 3.1. The problems

Re: Difficulty w/json keys

2010-04-23 Thread Jim Byrnes
Red wrote: My apologies for what is probably a simple question to most on this group. However, I am new to python and very new to json. I am trying to read in a json file from a twitter download. There are, generally, two types of lines: those lines with "text" and the other lines. I am only in

Re: python 2.6 py2exe wx app fails

2010-04-23 Thread Robin Becker
On 22/04/2010 13:56, Robin Becker wrote: I'm trying to move a wxPython application forward to 2.6, but although the app runs fine in 2.6 when run directly when I build the app into an exe using py2exe I get this popup message "application failed to initialize properly (0xc142)" when I try

Re: Difficulty w/json keys

2010-04-23 Thread Rolando Espinoza La Fuente
On Fri, Apr 23, 2010 at 10:20 AM, Red wrote: [...] > for line in f: >        j = json.loads(line) >        if 'text' in j: >                if 'lang' in j: >                        lang = j['lang'] >                        print "language", lang >                text = j['text'] "lang" key is in

Re: Difficulty w/json keys

2010-04-23 Thread J. Cliff Dyer
You need to know what your input data actually looks like, and the best thing for that is a little bit of formatting. I bet you can figure out the problem yourself, once you see the structure of your data more clearly. I've reformatted the JSON for you to help out. On Fri, 2010-04-23 at 07:20

[Python3] Reading a binary file and wrtiting the bytes verbatim in an utf-8 file

2010-04-23 Thread fab
Hello. I have to read the contents of a binary file (a PNG file exactly), and dump it into an RTF file. The RTF-file has been opened with codecs.open in utf-8 mode. As I expected, the utf-8 decoder chokes on some combinations of bits; how can I tell python to dump the bytes as they are, without

Re: Making special method names, work with __getattr__

2010-04-23 Thread Chris Rebert
On Fri, Apr 23, 2010 at 2:41 AM, Antoon Pardon wrote: > The following is a proof of concept. The idea is to have variables that > represent symbolic names/expressions, you can work with like ordinary > values, but that can be evaluated later. > > This is the code: > > -

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-23 Thread Steven Howe
Really! Learn to use google better. I just used "python sort list" Look at: http://wiki.python.org/moin/HowTo/Sorting Read about list.sort. Try, at a command prompt (assuming you have a unix shell), "pydoc list" search for sort; read it. It mentions 'reverse'. then slice the list to your desi

Re: [Python3] Reading a binary file and wrtiting the bytes verbatim in an utf-8 file

2010-04-23 Thread Chris Rebert
On Fri, Apr 23, 2010 at 9:22 AM, wrote: > I have to read the contents of a binary file (a PNG file exactly), and > dump it into an RTF file. > > The RTF-file has been opened with codecs.open in utf-8 mode. > > As I expected, the utf-8 decoder You mean encoder. > chokes on some combinations of b

DLLs loading in interpreter but not with direct run on Windows

2010-04-23 Thread JTimoty
Hi, I've got a weird problem, apparently related to the way python searches for DLLs on Windows. I compiled PyQt4 (no errors) but scripts that use it fail with "DLL load failed: Invalid access to memory location." If I play with loading the modules inside the interpreter, I see no errors. Even m

Re: [Python3] Reading a binary file and wrtiting the bytes verbatim in an utf-8 file

2010-04-23 Thread Chris Rebert
On Fri, Apr 23, 2010 at 9:48 AM, Chris Rebert wrote: > On Fri, Apr 23, 2010 at 9:22 AM,   wrote: >> I have to read the contents of a binary file (a PNG file exactly), and >> dump it into an RTF file. >> how can I tell python to dump the bytes as they are, without >> interpreting them? > > Go arou

Re: [Python3] Reading a binary file and wrtiting the bytes verbatim ?in an utf-8 file

2010-04-23 Thread fab
Thanks, I'll try this. > I have no idea how you'd go about reading the contents of such a file > in a sensible way. The purpose is to embed PNG pictures in an RTF file that will be read by OpenOffice. It seems that OpenOffice reads RTF in 8-bit, so it should be ok. The RTF is produced from a TeX

Re: Pydev 1.5.6 Released (Django Integration)

2010-04-23 Thread Fabio Zadrozny
>> Pydev 1.5.6 has been released >> >> Details on Pydev: http://pydev.org >> Details on its development: http://pydev.blogspot.com > > Question, > Does it have a feature to evaluate the current edit buffer and continue > with an interactive prompt? > Yes. See: http://pydev.org/manual_adv_interacti

Re: question about an exciting gotcha for unittests (and elsewhere) ...

2010-04-23 Thread Terry Reedy
On 4/23/2010 8:03 AM, Cameron Simpson wrote: On 23Apr2010 13:25, Peter Otten<__pete...@web.de> wrote: | Move the unit tests into a separate script and have that import the module | cs.nodedb.node. Hmm. I have been very attracted by the idea of having the unittest in the module itself, and ru

Re: Difficulty w/json keys

2010-04-23 Thread Terry Reedy
On 4/23/2010 10:20 AM, Red wrote: My apologies for what is probably a simple question to most on this group. However, I am new to python and very new to json. I am trying to read in a json file from a twitter download. There are, generally, two types of lines: those lines with "text" and the oth

Re: Difficulty w/json keys

2010-04-23 Thread Terry Reedy
On 4/23/2010 10:51 AM, Jim Byrnes wrote: I can't help you directly with your problem but have you seen this: http://arstechnica.com/open-source/guides/2010/04/tutorial-use-twitters-new-real-time-stream-api-in-python.ars Yes. Ignore the part about push versus pull (you are already doing the l

Re: question about an exciting gotcha for unittests (and elsewhere) ...

2010-04-23 Thread Gabriel Genellina
En Fri, 23 Apr 2010 03:15:16 -0300, Cameron Simpson escribió: On 23Apr2010 15:37, I wrote: | Experienced users will see at once what's happened: I've made a Node | myself in the test using the local class, and the Node class is thus | __main__.Node. However, my sql Backend class has independ

Re: Tkinter question

2010-04-23 Thread Rotwang
eb303 wrote: On Apr 23, 1:58 pm, Rotwang wrote: [...] I didn't. How do I get Python to display the draw window, other than by using mainloop()? Well, mainloop doesn't actually display anything. It's just the event loop for tk. So since you run your program within IDLE, there is already one

Re: Smtpd module

2010-04-23 Thread Gabriel Genellina
En Fri, 23 Apr 2010 06:30:42 -0300, Johny escribió: I would like to use smtpd module to write very simple smtp server but this server must: 1. accept several connections at the same time( like a forking server) I think asyncore takes care of that. 2. have basic authentication that is it m

Re: Calling multiple programs with subprocess

2010-04-23 Thread Amit Uttamchandani
On Thu, Apr 22, 2010 at 10:12:47PM -0400, Dave Angel wrote: > amit wrote: > >How does one go about calling multiple programs using subprocess? > > > >This is the program flow: > > > >C:\> wrenv.exe > >C:\> make clean > >.. > >.. > > > >The 'wrenv.exe' is necessary since it sets up the proper enviro

Re: On Class namespaces, calling methods

2010-04-23 Thread Aahz
In article <4bc120bd$0$8850$c3e8...@news.astraweb.com>, Steven D'Aprano wrote: > >I can only think of two circumstances where old-style classes are >*wrong*: if you use multiple inheritance with a diamond diagram ("...now >you have THREE problems" *wink*), if you intend using descriptors such a

Re: csv.py sucks for Decimal

2010-04-23 Thread Phlip
On Apr 22, 5:03 pm, MRAB wrote: > It might be a stupid question, but have you tried passing in the > Decimal() object itself? Yep. Nope. Might as well (we ain't working today). But sorry, as usual, for my tone, and thanks all for playing! -- http://mail.python.org/mailman/listinfo/python-list

Re: csv.py sucks for Decimal

2010-04-23 Thread Phlip
On Apr 22, 6:15 pm, Jerry Hill wrote: > 10,10.0,10.00,"10" > > That's an int, a float, a Decimal and a string, all of which appear to > be formatted as I would expect. When you point your finger 'cause your plan fell thru you got three more fingers, pointing back at you! --Dire Straights -- htt

"JOBS IN SWEDEN" " SWEDEN JOBS" "MEDICAL JOBS IN SWEDEN" "FINANCE JOBS IN SWEDEN" "ACCOUNTS JOBS IN SWEDEN" "ADMIN JOBS IN SWEDEN" "SALES JOBS IN SWEDEN" ON http://jobsinsweden-net.blogspot.com/

2010-04-23 Thread saima81
"JOBS IN SWEDEN" " SWEDEN JOBS" "MEDICAL JOBS IN SWEDEN" "FINANCE JOBS IN SWEDEN" "ACCOUNTS JOBS IN SWEDEN" "ADMIN JOBS IN SWEDEN" "SALES JOBS IN SWEDEN" ON http://jobsinsweden-net.blogspot.com/ "JOBS IN SWEDEN" " SWEDEN JOBS" "MEDICAL JOBS IN SWEDEN" "FINANCE JOBS IN SWEDEN" "ACCOUNTS JOBS IN SWE

problem when running .py file

2010-04-23 Thread Tingting HAN
Dear Officer, I first apologize that I am totally new for python. I have downloaded a code packet “triMC3D” from online, and within it there is a file “configuration.py”.I downloaded and installed python and some related packages, tried very hard, but there is still the following error: the Tr

Re: when should I explicitly close a file?

2010-04-23 Thread Steven D'Aprano
On Fri, 23 Apr 2010 13:19:41 +0200, Alf P. Steinbach wrote: > But for a literal context-free interpretation e.g. the 'sys.getrefcount' > function is not documented as CPython only and thus an implementation > that didn't do reference counting would not be a conforming Python > implementation. Sin

Re: Difficulty w/json keys

2010-04-23 Thread Red
Thanks to Cliff and Rolando who saw where my real problem was. Terry,Jim: I had not seen the tutorial before, so I'll have to dig into that as well. So little time. Cheers On Apr 23, 10:06 am, "J. Cliff Dyer" wrote: > You need to know what your input data actually looks like, and the best > th

Re: Difficulty w/json keys

2010-04-23 Thread Red
On Apr 23, 1:17 pm, Terry Reedy wrote: > On 4/23/2010 10:20 AM, Red wrote: > > > My apologies for what is probably a simple question to most on this > > group. However, I am new to python and very new to json. > > > I am trying to read in a json file from a twitter download. There are, > > general

Re: Smtpd module

2010-04-23 Thread Miki
Hello, > I would like to use smtpd module to write very simple smtp server but > this server must: > > 1. accept several connections at the same time( like a forking server) > 2. have basic authentication  that is it must understand AUTH command. > > Does anyone know if the smtpd module have both?

Re: How to get live streaming of friends tweets??

2010-04-23 Thread Florian Diesch
has some explanations about how to use real-time stream API >"eka (Esteban)" writes: > > IMO the real time update is your work to do. > > You can poll, to say, each 1 minute or less

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-23 Thread Raymond Hettinger
On Apr 22, 10:49 am, John Nagle wrote: > Chris Rebert wrote: > > 2010/4/22 Jo Chan : > >> Hi,friends. > >>  I wanna ask if there is a function which is able to take a list as > >> argument > >> and then return its top-k maximums? > >> I only know about max which is poorly a top-1 maximum function

Re: Hi, friends. I wanna ask if there is a function which is able to take a list as argument and then return its top-k maximums?

2010-04-23 Thread Raymond Hettinger
On Apr 23, 1:24 am, Bryan wrote: > That is interesting. The above algorithm for nlargest is better, but > to use it for nsmallest requires a largest-on-top heap, which the > module does not bother to implement. FWIW, the pure python versions differ because they are both implemented in terms of th

Re: problem when running .py file

2010-04-23 Thread Gabriel Genellina
En Fri, 23 Apr 2010 18:43:41 -0300, Tingting HAN escribió: I first apologize that I am totally new for python. I have downloaded a code packet “triMC3D” from online, and within it there is a file “configuration.py”.I downloaded and installed python and some related packages, tried very hard

Re: Calling multiple programs with subprocess

2010-04-23 Thread Kushal Kumaran
On Sat, Apr 24, 2010 at 1:21 AM, Amit Uttamchandani wrote: > On Thu, Apr 22, 2010 at 10:12:47PM -0400, Dave Angel wrote: >> amit wrote: >> >How does one go about calling multiple programs using subprocess? >> > >> >This is the program flow: >> > >> >C:\> wrenv.exe >> >C:\> make clean >> >.. >> >..

NotImplemented used in Decimal

2010-04-23 Thread Steven D'Aprano
I'm reading the source code for decimal.Decimal, and I see that the arithmetic operations (__add__, __sub__, etc.) start with code like this: if other is NotImplemented: return other I don't understand the purpose of this. I presume that it is *not* for the use-case of: d

Re: NotImplemented used in Decimal

2010-04-23 Thread Kushal Kumaran
On Sat, Apr 24, 2010 at 8:54 AM, Steven D'Aprano wrote: > I'm reading the source code for decimal.Decimal, and I see that the > arithmetic operations (__add__, __sub__, etc.) start with code like this: > >        if other is NotImplemented: >            return other > > > I don't understand the pu

"SAUDI ARABIAN GIRLS" "MUSLIM SEXY GIRLS""SEXU SAUDI GIRLS" "SEXY HOT GIRLS" "SEXY ARABIAN GIRLS" "SEXY ARABIAN LADIES" "SEXY HOT SAID GIRLS" "HOT ARABIAN GIRLS" "SEXY DATING SAUDI GIRLS" "HOT WIFE" O

2010-04-23 Thread Naeem
"SAUDI ARABIAN GIRLS" "MUSLIM SEXY GIRLS""SEXU SAUDI GIRLS" "SEXY HOT GIRLS" "SEXY ARABIAN GIRLS" "SEXY ARABIAN LADIES" "SEXY HOT SAID GIRLS" "HOT ARABIAN GIRLS" "SEXY DATING SAUDI GIRLS" "HOT WIFE" ON http://hollywood6y.blogspot.com/ "SAUDI ARABIAN GIRLS" "MUSLIM SEXY GIRLS""SEXU SAUDI

Re: NotImplemented used in Decimal

2010-04-23 Thread Steven D'Aprano
On Sat, 24 Apr 2010 09:05:14 +0530, Kushal Kumaran wrote: > On Sat, Apr 24, 2010 at 8:54 AM, Steven D'Aprano > wrote: >> I'm reading the source code for decimal.Decimal, and I see that the >> arithmetic operations (__add__, __sub__, etc.) start with code like >> this: >> >>        if other is Not

Re: NotImplemented used in Decimal

2010-04-23 Thread Chris Rebert
On Fri, Apr 23, 2010 at 11:25 PM, Steven D'Aprano wrote: > On Sat, 24 Apr 2010 09:05:14 +0530, Kushal Kumaran wrote: >> On Sat, Apr 24, 2010 at 8:54 AM, Steven D'Aprano >> wrote: >>> I'm reading the source code for decimal.Decimal, and I see that the >>> arithmetic operations (__add__, __sub__, e