Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE

2011-06-09 Thread Larry Hudson
On 06/08/2011 01:09 PM, Cathy James wrote: I am almost there, but I need a little help: I would like to a) print my dogs in the format index. name: breed as follows: 0. Mimi:Poodle 1.Sunny: Beagle 2. Bunny: German Shepard I am getting (0, ('Mimi', 'Poodle')) . Mimi : Poodle instead-what have

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney wrote: > Eric Snow writes: > >> p.s. Am I missing something or can you really not change the docstring >> of a class? I was thinking about the idea of inheriting class >> docstrings too. > > The docstring of an object (whether function or class or modul

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 12:13:06 AM UTC-7, Eric Snow wrote: > On Thu, Jun 9, 2011 at 12:37 AM, Ben Finney wrote: > > So, it's even possible to do what you ask without decorators at all: > > > >    class Foo(object): > >        def frob(self): > >            """ Frobnicate thyself. """ > > > >  

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Eric Snow writes: > AttributeError: attribute '__doc__' of 'type' objects is not writable > > That is on 3.3. Well, that sucks :-( Where can we see the discussion of that change before it was implemented? > I'm just looking for a way to do it with decorators in the class body > without using m

Any Better logic for this problem..

2011-06-09 Thread Ganapathy Subramanium
Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 When the number gets bigger, the range cannot iterate through bigger number and it does not work. When I googled , I came across creating our own range function

Re: Any Better logic for this problem..

2011-06-09 Thread Chris Rebert
On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium wrote: > Hi Guru's, > I'm working on a solution to find the prime factor of the number > This part of the code works.. http://www.pastie.org/2041584 For the archives, that code is: num = 13195 #num = 600851475143L prime_numbers = [2] prime_fa

Re: Any Better logic for this problem..

2011-06-09 Thread Ian
On 09/06/2011 09:31, Ganapathy Subramanium wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 When the number gets bigger, the range cannot iterate through bigger number and it does not work. When I g

Re: Any Better logic for this problem..

2011-06-09 Thread Chris Angelico
On Thu, Jun 9, 2011 at 7:06 PM, Chris Rebert wrote: > On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium > wrote: >> Hi Guru's, >> I'm working on a solution to find the prime factor of the number >> This part of the code works.. http://www.pastie.org/2041584 > > For the archives, that code is:

Re: test_popen

2011-06-09 Thread Dave Angel
On 01/-10/-28163 02:59 PM, harrismh777 wrote: Looks like my 2.7 test_popen failure is an open issue7671... since Jan 2010. Looks like it really does function ok. At any rate, I was able to test Popen myself today, and it ran fine. I needed to write a script that will disable the touch pad on thi

Re: how to inherit docstrings?

2011-06-09 Thread Duncan Booth
Ben Finney wrote: > Eric Snow writes: > >> AttributeError: attribute '__doc__' of 'type' objects is not writable >> >> That is on 3.3. > > Well, that sucks :-( > > Where can we see the discussion of that change before it was > implemented? > Change? What change? C:\Python27>python Python 2

Re: smtp - python

2011-06-09 Thread Adam Tauno Williams
On Wed, 2011-06-08 at 17:18 -0300, Josias L.G wrote: > Hi for all, > I'm very newbie in python and is very good language. > I'm trying to adopt a example: > import smtpd > import asyncore > server = smtpd.PureProxy(('127.0.0.1', 1025), ('mail', 25)) > asyncore.loop() > I'm trying to copy the email

Investing in data management services could have vast benefits

2011-06-09 Thread waner
If your business has huge databases of client details and other information, maintenance these records as accurate and current as possible should be a top priority, learn more http://worldupdateinformation.com/2011/06/08/investing-in-data-management-services-could-have-vast-benefits/ -- http://m

Re: Any Better logic for this problem..

2011-06-09 Thread Dave Angel
On 01/-10/-28163 02:59 PM, Chris Rebert wrote: On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium wrote: Hi Guru's, I'm working on a solution to find the prime factor of the number This part of the code works.. http://www.pastie.org/2041584 For the archives, that code is: num =3195 #num

Re: The pythonic way equal to "whoami"

2011-06-09 Thread TheSaint
Christopher Head wrote: > It is. Until Linux capabilities, EUID==0 used to be special-cased in the > kernel Thank you all, I got a good learning *and* something to rememeber. -- goto /dev/null -- http://mail.python.org/mailman/listinfo/python-list

Re: Problems Compiling Python 2.6.7 for Win7

2011-06-09 Thread Jay Osako
On Jun 8, 6:56 pm, "Gabriel Genellina" wrote: > En Wed, 08 Jun 2011 12:28:56 -0300, Jay Osako   > escribi : > > > I have been trying to get PyODBC to work with Python 2.6 (the latest > > version it is known to be compatible with) and Django, but have run > > into a problem which, according to the

Iterating into maildir or mbox

2011-06-09 Thread TheSaint
Hello, originally with python 2.4 ~ 2.7 (I think) iterating a maildir I was using ++Code+ try: mbox= mailbox.PortableUnixMailbox(open(mbox,'r')) except IOError: # if file not found default is None mbox= None while mbox: msg

Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE

2011-06-09 Thread Ethan Furman
Larry Hudson wrote: On 06/08/2011 01:09 PM, Cathy James wrote: Dog Breed: ")) while not dogs: print("Goodbye!!") sys.exit() else: else does not belong with while. else works just fine with while; it is the path taken when the while is exhausted, but not broken ou

Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE

2011-06-09 Thread Ethan Furman
Ethan Furman wrote: Larry Hudson wrote: On 06/08/2011 01:09 PM, Cathy James wrote: Dog Breed: ")) while not dogs: print("Goodbye!!") sys.exit() else: else does not belong with while. else works just fine with while; it is the path taken when the while is exhaust

Re: best book about Webdesign with Django

2011-06-09 Thread Thomas Guettler
On 08.06.2011 12:29, News123 wrote: > Hi, > > > Do you have any recommendations for a good book about Web design with > Django? You can do web design with HTML, CSS and Javascript. There are a lot of books about this. Django is a good web framework. It does not care much about CSS and Javascrip

Gnumeric scripting and license

2011-06-09 Thread Bhushit Joshipura
I am looking for some information about Gnumeric scripting licensing. Here is my question: "If I script for Gnumeric using Python, must I release the script code?" I am unable to draw a line where Gnumeric GPL ends and where proprietary nature of macros start. Thanks in advance, -Bhushit -- http:

Re: how to inherit docstrings?

2011-06-09 Thread Steven D'Aprano
On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote: > Eric Snow writes: > >> AttributeError: attribute '__doc__' of 'type' objects is not writable >> >> That is on 3.3. > > Well, that sucks :-( > > Where can we see the discussion of that change before it was > implemented? It goes back to P

Re: how to inherit docstrings?

2011-06-09 Thread Ethan Furman
Eric Snow wrote: p.s. Am I missing something or can you really not change the docstring of a class? I was thinking about the idea of inheriting class docstrings too. 8< """module level docstring""" def func(): """function level docst

Re: pexpect and OpenVMS

2011-06-09 Thread Mark Franklin
I ran into a similar problem. I found throttling self.sh.delaybeforesend works for me. I'm on ubuntu. -- http://mail.python.org/mailman/listinfo/python-list

Python 2.6 OR 3.2

2011-06-09 Thread hisan
Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference -- http://mail.python.org/mailman/listinfo/python-list

Re: Import error while running python application on Mac OS

2011-06-09 Thread hisan
On Jun 8, 9:20 pm, hisan wrote: > HI All, > > I have created an application for Mac OS using py2app module, in my > python script i have external modules such as MySQLdb and other , > while trying to run on Mac OS i get an error saying unable to import > the module MySQLdb. > On Windows i convert

Re: Python 2.6 OR 3.2

2011-06-09 Thread John Gordon
In <9037ef5f-53c5-42c6-ac5d-8f942df6c...@x38g2000pri.googlegroups.com> hisan writes: > Hi All, > Please let me know which one is GOOD whether Python 2.6 OR 3.2. > Please let me know the difference between them. > Please give some refernce site or books to know the difference If you're starting

Re: Paramiko Threading Error

2011-06-09 Thread David
Il Tue, 7 Jun 2011 19:25:43 -0700 (PDT), mud ha scritto: > Hi All, > > Does anybody know what the following error means with paramiko, and > how to fix it. > > I don't know what is causing it and why. I have updated paramiko to > version 1.7.7.1 (George) but still has the same issue. > > Also I

Re: Any Better logic for this problem..

2011-06-09 Thread geremy condra
On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel wrote: > On 01/-10/-28163 02:59 PM, Chris Rebert wrote: >> >> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium >>  wrote: >>> >>> Hi Guru's, >>> I'm working on a solution to find the prime factor of the number >>> This part of the code works.. http:

urllib2 opendirector versus request object

2011-06-09 Thread Dennis
Hi, I was wondering what the difference or advantages to using an opendirector with handlers or using a request object? I am having an issue where when I use the open director and I try to add headers it adds them after the connection-close header, but when I use the request object it does not.

Re: Import error while running python application on Mac OS

2011-06-09 Thread Ned Deily
In article <1167f414-8901-4f9c-9d51-2723213fd...@k3g2000prl.googlegroups.com>, hisan wrote: > On Jun 8, 9:20 pm, hisan wrote: > > I have created an application for Mac OS using py2app module, in my > > python script i have external modules such as MySQLdb and other , > > while trying to run on

Re: Python 2.6 OR 3.2

2011-06-09 Thread Corey Richardson
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 06/09/2011 01:18 PM, hisan wrote: > Hi All, > > Please let me know which one is GOOD whether Python 2.6 OR 3.2. > Please let me know the difference between them. > Please give some refernce site or books to know the difference http://wiki.python.o

Re: Eigensolver for Large Sparse Matrices in Python

2011-06-09 Thread Javier
Hi, I think you can also use scipy.sparse.linalg.eigen.arpack in addition to scipy.sparse.linalg.eigen.lobpcg Also, from my experience with this routines I can tell you that they don't like to be asked a small number of eigenvalues. Contrary to common sense I have found these routines to prefer

JSONBOT 0.7.1 released

2011-06-09 Thread Bart Thate
Hello kids and parents !! I just want to announce the release of JSONBOT 0.7.1. This release consists of minor bug fixes and new xmpp auth code (SASL) which support DIGEST-MD5 and PLAIN authing. JSONBOT should run well again on systems with python2.5 installed. You can fetch it at http://jsonbot

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Benjamin Kaplan wrote: > 2011/6/8 Sérgio Monteiro Basto : >> hi, >> cat test.py >> #!/usr/bin/env python >> #-*- coding: utf-8 -*- >> u = u'moçambique' >> print u.encode("utf-8") >> print u >> >> chmod +x test.py >> ./test.py >> moçambique >> moçambique >> >> ./test.py > output.txt >> Traceback (m

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Ben Finney wrote: > Sérgio Monteiro Basto writes: > >> ./test.py >> moçambique >> moçambique > > In this case your terminal is reporting its encoding to Python, and it's > capable of taking the UTF-8 data that you send to it in both cases. > >> ./test.py > output.txt >> Traceback (most recent

[JOB] Python Programmer, Newport Beach, CA | 6-24 months - Relo OK

2011-06-09 Thread PHP Recruiter
This is a contract/hourly 6-24 month on-site Python Programming job located in Newport Beach, CA paying $50.00 to $80.00 per hour depending on experience. Local candidates preferred, but all considered. Relocation expenses covered. Our Newport Beach, CA client is seeking a Python programmer with

Re: Gnumeric scripting and license

2011-06-09 Thread Ben Finney
Bhushit Joshipura writes: > I am looking for some information about Gnumeric scripting licensing. You're asking in the wrong place; that's a question for the authors of the GPL, and for the copyright holders in Gnumeric. The authors of the GPL have an FAQ document you will likely find informati

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Steven D'Aprano writes: > On Thu, 09 Jun 2011 17:44:32 +1000, Ben Finney wrote: > > > Eric Snow writes: > > > >> AttributeError: attribute '__doc__' of 'type' objects is not writable > >> > >> That is on 3.3. > > > > Well, that sucks :-( > > > > Where can we see the discussion of that change

Re: the stupid encoding problem to stdout

2011-06-09 Thread Nobody
On Thu, 09 Jun 2011 22:14:17 +0100, Sérgio Monteiro Basto wrote: > Exactly the opposite , if python don't know the encoding should not try > decode to ASCII. What should it decode to, then? You can't write characters to a stream, only bytes. > I want python don't care about encoding terminal a

Re: Gnumeric scripting and license

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 12:47 AM, Bhushit Joshipura wrote: > I am looking for some information about Gnumeric scripting licensing. > Here is my question: > "If I script for Gnumeric using Python, must I release the script > code?" > I am unable to draw a line where Gnumeric GPL ends and where > pr

Re: how to inherit docstrings?

2011-06-09 Thread Gregory Ewing
IMO, it shouldn't be necessary to explicitly copy docstrings around like this in the first place. Either it should happen automatically, or help() should be smart enough to look up the inheritance hierarchy when given a method that doesn't have a docstring of its own. Unfortunately, since unbound

Re: Any Better logic for this problem..

2011-06-09 Thread Gregory Ewing
Chris Angelico wrote: Rather than find all prime numbers up to num, stop at sqrt(num) - it's not possible to have any prime factors larger than that. That's not quite true -- the prime factors of 26 are 2 and 13, and 13 is clearly greater than sqrt(26). However, once you've divided out all th

Re: Any Better logic for this problem..

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 8:39 AM, Gregory Ewing wrote: > Chris Angelico wrote: > >> Rather than find all prime numbers up to num, stop at sqrt(num) - it's >> not possible to have any prime factors larger than that. > > That's not quite true -- the prime factors of 26 are 2 and 13, > and 13 is clear

Re: Python 2.6 OR 3.2

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 3:18 AM, hisan wrote: > Hi All, > > Please let me know which one is GOOD whether Python 2.6 OR 3.2. As a side point, you should probably use 2.7 rather than 2.6. With regard to 2.x versus 3.x, Corey already posted a link to an excellent article. Chris Angelico -- http://

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 4:27 PM, Gregory Ewing wrote: > IMO, it shouldn't be necessary to explicitly copy docstrings > around like this in the first place. Either it should happen > automatically, or help() should be smart enough to look up > the inheritance hierarchy when given a method that doesn

Re: the stupid encoding problem to stdout

2011-06-09 Thread Ben Finney
Sérgio Monteiro Basto writes: > Ben Finney wrote: > > > In this case your shell has no preference for the encoding (since > > you're redirecting output to a file). > > How I say to python that I want that write in utf-8 to files ? You already did: > > In the first print statement you specify t

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Gregory Ewing writes: > IMO, it shouldn't be necessary to explicitly copy docstrings around > like this in the first place. Either it should happen automatically, > or help() should be smart enough to look up the inheritance hierarchy > when given a method that doesn't have a docstring of its own

__doc__ immutable for classes (was: Re: how to inherit docstrings?)

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 10:10 AM, Ethan Furman wrote: > Eric Snow wrote: >> >> p.s. Am I missing something or can you really not change the docstring >> of a class?  I was thinking about the idea of inheriting class >> docstrings too. > > 8< >

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 5:23 PM, Ben Finney wrote: > Gregory Ewing writes: > >> IMO, it shouldn't be necessary to explicitly copy docstrings around >> like this in the first place. Either it should happen automatically, >> or help() should be smart enough to look up the inheritance hierarchy >> wh

Re: the stupid encoding problem to stdout

2011-06-09 Thread Terry Reedy
On 6/9/2011 5:46 PM, Nobody wrote: On Thu, 09 Jun 2011 22:14:17 +0100, Sérgio Monteiro Basto wrote: Exactly the opposite , if python don't know the encoding should not try decode to ASCII. What should it decode to, then? You can't write characters to a stream, only bytes. I want python don

Re: the stupid encoding problem to stdout

2011-06-09 Thread Mark Tolonen
"Sérgio Monteiro Basto" wrote in message news:4df137a7$0$30580$a729d...@news.telepac.pt... How I change sys.stdout.encoding always to UTF-8 ? at least have a consistent sys.stdout.encoding There is an environment variable that can force Python I/O to be a specfic encoding: PYTHONIOEN

Re: Any Better logic for this problem..

2011-06-09 Thread Dan Stromberg
On Thu, Jun 9, 2011 at 10:55 AM, geremy condra wrote: > On Thu, Jun 9, 2011 at 4:38 AM, Dave Angel wrote: > > On 01/-10/-28163 02:59 PM, Chris Rebert wrote: > >> > >> On Thu, Jun 9, 2011 at 1:31 AM, Ganapathy Subramanium > >> wrote: > >>> > >>> Hi Guru's, > >>> I'm working on a solution to fin

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 3:27:36 PM UTC-7, Gregory Ewing wrote: > IMO, it shouldn't be necessary to explicitly copy docstrings > around like this in the first place. Either it should happen > automatically, or help() should be smart enough to look up > the inheritance hierarchy when given a method

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Nobody wrote: >> Exactly the opposite , if python don't know the encoding should not try >> decode to ASCII. > > What should it decode to, then? UTF-8, as in tty, how I change this default ? > You can't write characters to a stream, only bytes. > ok got the point . Thanks, -- http://mail.p

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Mark Tolonen wrote: > > "Sérgio Monteiro Basto" wrote in message > news:4df137a7$0$30580$a729d...@news.telepac.pt... > >> How I change sys.stdout.encoding always to UTF-8 ? at least have a >> consistent sys.stdout.encoding > > There is an environment variable that can force Python I/O to be a

Re: Python 2.6 OR 3.2

2011-06-09 Thread Dan Stromberg
If your dependencies are satisfiable with 3.2, you're better off with 3.2. If not, use 2.7, or consider porting the dependencies yourself (assuming those dependencies have code available). Both 2.x and 3.x are good, but 3.x is clearly the way forward. 3.x has some annoyances corrected: more cent

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Carl Banks writes: > Presumably, the reason you are overriding a method in a subclass is to > change its behavior; I'd expect an inherited docstring to be > inaccurate more often than not. In which case the onus is on the programmer implementing different behaviour to also override the docstring

Re: the stupid encoding problem to stdout

2011-06-09 Thread Ben Finney
Sérgio Monteiro Basto writes: > Nobody wrote: > > >> Exactly the opposite , if python don't know the encoding should not > >> try decode to ASCII. Are you advocating that Python should refuse to write characters unless the encoding is specified? I could sympathise with that, but currently that's

Re: the stupid encoding problem to stdout

2011-06-09 Thread Sérgio Monteiro Basto
Ben Finney wrote: >> >> Exactly the opposite , if python don't know the encoding should not >> >> try decode to ASCII. > > Are you advocating that Python should refuse to write characters unless > the encoding is specified? I could sympathise with that, but currently > that's not what Python does

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 7:12 PM, Carl Banks wrote: > On Thursday, June 9, 2011 3:27:36 PM UTC-7, Gregory Ewing wrote: >> IMO, it shouldn't be necessary to explicitly copy docstrings >> around like this in the first place. Either it should happen >> automatically, or help() should be smart enough to

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 6:42:44 PM UTC-7, Ben Finney wrote: > Carl Banks > writes: > > > Presumably, the reason you are overriding a method in a subclass is to > > change its behavior; I'd expect an inherited docstring to be > > inaccurate more often than not. > > In which case the onus is on

Re: how to inherit docstrings?

2011-06-09 Thread Carl Banks
On Thursday, June 9, 2011 7:37:19 PM UTC-7, Eric Snow wrote: > When I write ABCs to capture an interface, I usually put the > documentation in the docstrings there. Then when I implement I want > to inherit the docstrings. Implicit docstring inheritance for > abstract base classes would meet my n

Re: Python 2.6 OR 3.2

2011-06-09 Thread Kyle T. Jones
John Gordon wrote: In <9037ef5f-53c5-42c6-ac5d-8f942df6c...@x38g2000pri.googlegroups.com> hisan writes: Hi All, Please let me know which one is GOOD whether Python 2.6 OR 3.2. Please let me know the difference between them. Please give some refernce site or books to know the difference I

Re: Python 2.6 OR 3.2

2011-06-09 Thread Terry Reedy
On 6/9/2011 11:41 PM, Kyle T. Jones wrote: Library support. I urge people who use 2.x only for library support to let library authors that they would have preferred a 3.x compatible library. I have library authors say "Why port when none of my users have asked for a port?" A couple of year

Re: how to inherit docstrings?

2011-06-09 Thread Terry Reedy
On 6/9/2011 9:12 PM, Carl Banks wrote: Presumably, the reason you are overriding a method in a subclass is to change its behavior; I'd expect an inherited docstring to be inaccurate more often than not. So I'd be -1 on automatically inheriting them. However, I'd be +1 easily on a little help

Re: Python 2.6 OR 3.2

2011-06-09 Thread Andrew Berg
On 2011.06.09 12:18 PM, hisan wrote: > Hi All, > > Please let me know which one is GOOD whether Python 2.6 OR 3.2. > Please let me know the difference between them. > Please give some refernce site or books to know the difference I'm just a beginner, but AFAICT, there are three reasons to learn Pyt

Re: how to inherit docstrings?

2011-06-09 Thread Eric Snow
On Thu, Jun 9, 2011 at 9:59 PM, Terry Reedy wrote: > On 6/9/2011 9:12 PM, Carl Banks wrote: > >> Presumably, the reason you are overriding a method in a subclass is to >> change its behavior; I'd expect an inherited docstring to be inaccurate more >> often than not.  So I'd be -1 on automatically

Re: smtp - python

2011-06-09 Thread Josias L . Gonçalves
Thank you. The question is that. Get the messages that was sended and save in maildir format. One more question... testing here, has the smtpd.pureproxy support stream username and password for smtp authentication ?. I read some doc and don't find anything about. -- http://mail.python.org/mailman/

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Carl Banks writes: > On Thursday, June 9, 2011 7:37:19 PM UTC-7, Eric Snow wrote: > > When I write ABCs to capture an interface, I usually put the > > documentation in the docstrings there. Then when I implement I want > > to inherit the docstrings. Implicit docstring inheritance for > > abstract

Re: how to inherit docstrings?

2011-06-09 Thread Ben Finney
Ben Finney writes: > class Square(Shape): > """ An equal-sided quadrilateral polygon. """ That this docstring is imprecise (it describes any rhombus, not necessarily a square) is something I hope no-one else notices or draws attention to. Oh, darn. -- \ “The sun never sets on the B

Re: how to inherit docstrings?

2011-06-09 Thread Chris Angelico
On Fri, Jun 10, 2011 at 3:25 PM, Ben Finney wrote: > Ben Finney writes: > >> class Square(Shape): >>     """ An equal-sided quadrilateral polygon. """ > > That this docstring is imprecise (it describes any rhombus, not > necessarily a square) is something I hope no-one else notices or draws > att

Re: the stupid encoding problem to stdout

2011-06-09 Thread Laurent Claessens
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit : > hi, > cat test.py > #!/usr/bin/env python > #-*- coding: utf-8 -*- > u = u'moçambique' > print u.encode("utf-8") > print u > > chmod +x test.py > ../test.py > moçambique > moçambique The following tries to encode before to print. If you pass

Re: the stupid encoding problem to stdout

2011-06-09 Thread Laurent Claessens
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit : > hi, > cat test.py > #!/usr/bin/env python > #-*- coding: utf-8 -*- > u = u'moçambique' > print u.encode("utf-8") > print u > > chmod +x test.py > ../test.py > moçambique > moçambique The following tries to encode before to print. If you pass

Re: the stupid encoding problem to stdout

2011-06-09 Thread Laurent Claessens
Le 09/06/2011 04:18, Sérgio Monteiro Basto a écrit : > hi, > cat test.py > #!/usr/bin/env python > #-*- coding: utf-8 -*- > u = u'moçambique' > print u.encode("utf-8") > print u > > chmod +x test.py > ../test.py > moçambique > moçambique The following tries to encode before to print. If you pass

Re: Python 2.6 OR 3.2

2011-06-09 Thread harrismh777
Terry Reedy wrote: A couple of years ago, users were people who were already programming with 2.x. That is changing now. ... big time ! :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Python 2.6 OR 3.2

2011-06-09 Thread harrismh777
Andrew Berg wrote: AFAICT, there are three reasons to learn Python 2: ... there is a fourth reason. The linux distro you are using currently was customized with python 2.x I ran into this problem this week in fact... on my HP g6 ubuntu notebook running 10.04 lucid. It ships with the 2.6.5

Re: Of Functions, Objects, and Methods-I NEED HELP PLEASE

2011-06-09 Thread Larry Hudson
On 06/08/2011 11:59 PM, Larry Hudson wrote: On 06/08/2011 01:09 PM, Cathy James wrote: I am almost there, but I need a little help: I would like to ... Here's one possible replacement. There are many other approaches as well. (This leaves the individual dogs as a (name, breed) tuple. It co