Re: sort(*, key=None, reverse=None)

2013-12-20 Thread Chris Angelico
On Sat, Dec 21, 2013 at 6:24 PM, Mark Lawrence wrote: > On 21/12/2013 07:20, Devin Jeanpierre wrote: >> >> On Fri, Dec 20, 2013 at 11:16 PM, Mark Lawrence >> wrote: >>> >>> The subject refers to the list sort method given here >>> http://docs.python.org/3/library/stdtypes.html#list. I believe th

Re: sort(*, key=None, reverse=None)

2013-12-20 Thread Chris Angelico
On Sat, Dec 21, 2013 at 6:16 PM, Mark Lawrence wrote: > The subject refers to the list sort method given here > http://docs.python.org/3/library/stdtypes.html#list. I believe that the > "*," bit is simply a typo, given that the docs also state "sort() accepts > two arguments that can only be pass

Re: sort(*, key=None, reverse=None)

2013-12-20 Thread Mark Lawrence
On 21/12/2013 07:20, Devin Jeanpierre wrote: On Fri, Dec 20, 2013 at 11:16 PM, Mark Lawrence wrote: The subject refers to the list sort method given here http://docs.python.org/3/library/stdtypes.html#list. I believe that the "*," bit is simply a typo, given that the docs also state "sort() ac

Re: sort(*, key=None, reverse=None)

2013-12-20 Thread Devin Jeanpierre
On Fri, Dec 20, 2013 at 11:16 PM, Mark Lawrence wrote: > The subject refers to the list sort method given here > http://docs.python.org/3/library/stdtypes.html#list. I believe that the > "*," bit is simply a typo, given that the docs also state "sort() accepts > two arguments that can only be pas

sort(*, key=None, reverse=None)

2013-12-20 Thread Mark Lawrence
The subject refers to the list sort method given here http://docs.python.org/3/library/stdtypes.html#list. I believe that the "*," bit is simply a typo, given that the docs also state "sort() accepts two arguments that can only be passed by keyword". Am I correct? -- My fellow Pythonistas, a

Re: Why Python is like C++

2013-12-20 Thread Mark Lawrence
On 20/12/2013 14:19, Roy Smith wrote: http://xkcd.com/1306/ I believe that to be a very superficial like. They're unlike in that once C++ people have compiled their code they can head down to the pub, but Python people have to stay at work testing because the compiler hasn't caught all pot

Re: Why Python is like C++

2013-12-20 Thread Michael Torrie
On 12/20/2013 02:44 PM, Gregory Ewing wrote: > Serhiy Storchaka wrote: >> 20.12.13 16:19, Roy Smith написав(ла): >> >>> http://xkcd.com/1306/ >> >> QBASIC$, not $QBASIC. > > Or just QB$. (Most BASICs of that era only regarded > the first two characters as significant.) Maybe BASIC's of the 70s.

Re: bytearray inconsistencies?

2013-12-20 Thread Mark Lawrence
On 21/12/2013 01:58, Ned Batchelder wrote: On 12/20/13 8:06 PM, Mark Lawrence wrote: Quoting from http://docs.python.org/3/library/functions.html#bytearray "The bytearray type is a mutable sequence of integers in the range 0 <= x < 256." Quoting from http://docs.python.org/3/library/stdtypes.h

Re: Experiences/guidance on teaching Python as a first programming language

2013-12-20 Thread Ned Batchelder
On 12/20/13 6:58 PM, Dennis Lee Bieber wrote: On 20 Dec 2013 02:16:05 GMT, Steven D'Aprano declaimed the following: 2) Even for kernel developers, I believe that systems languages should be safe by default. You ought to have to explicitly disable (say) bounds checking in critical sections of

Re: bytearray inconsistencies?

2013-12-20 Thread Ned Batchelder
On 12/20/13 8:06 PM, Mark Lawrence wrote: Quoting from http://docs.python.org/3/library/functions.html#bytearray "The bytearray type is a mutable sequence of integers in the range 0 <= x < 256." Quoting from http://docs.python.org/3/library/stdtypes.html#bytes-methods "Whenever a bytes or byte

Re: How to import Wave files into python?

2013-12-20 Thread diesch111
On Wednesday, December 18, 2013 8:45:08 AM UTC-8, twilk...@gmail.com wrote: > How exactly do I import a .wav file and run it? > > also is it possible to run it inside a while loop if so or it just start > playing when its run? - Tom 14 QSound.play(wave_file) -- https://mail.python.org/mailman/l

bytearray inconsistencies?

2013-12-20 Thread Mark Lawrence
Quoting from http://docs.python.org/3/library/functions.html#bytearray "The bytearray type is a mutable sequence of integers in the range 0 <= x < 256." Quoting from http://docs.python.org/3/library/stdtypes.html#bytes-methods "Whenever a bytes or bytearray method needs to interpret the bytes

Re: Struggling with unittest discovery - how to structure my project test suite

2013-12-20 Thread Paul Moore
On Friday, 20 December 2013 17:41:40 UTC, Serhiy Storchaka wrote: > 20.12.13 16:47, Paul Moore написав(ла): > > > 1. I can run all the tests easily on demand. > > 2. I can run just the functional or unit tests when needed. > > python -m unittest discover -s tests/functional > python -m unittest d

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Gregory Ewing
rusi wrote: Good idea. Only you were beaten to it by about 2 decades. More than 2, I think. Lisp: (setq x y) Algol: x := y Smalltalk: x <- y (where <- is a "left arrow" character) Cobol: MOVE X TO Y -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Terry Reedy
On 12/20/2013 10:16 AM, dec...@msn.com wrote: y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:')) print type y I recommend starting with 3.3 unless your are forced to use 2.x. I also recommend trying code before posting it. I'm assuming that y is an object.

Re: Struggling with unittest discovery - how to structure my project test suite

2013-12-20 Thread Terry Reedy
On 12/20/2013 12:41 PM, Serhiy Storchaka wrote: 20.12.13 16:47, Paul Moore написав(ла): What's the best way of structuring my projects so that: It depends on your tradeoff between extra setup in the files and how much you type each time you run tests. 1. I can run all the tests easily on d

Re: Why Python is like C++

2013-12-20 Thread Gregory Ewing
Serhiy Storchaka wrote: 20.12.13 16:19, Roy Smith написав(ла): http://xkcd.com/1306/ QBASIC$, not $QBASIC. Or just QB$. (Most BASICs of that era only regarded the first two characters as significant.) -- Greg -- https://mail.python.org/mailman/listinfo/python-list

Re: Copy a file like unix cp -a --reflink

2013-12-20 Thread Anssi Saari
Paulo da Silva writes: > Hi! > > Is there a way to copy a file the same as Unix command: > > cp -a --reflink src dest > > without invoking a shell command? I vaguely remember this was asked and answered some time ago and the answer was no, even just for -a. In fact, the python shutil module doc

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-20 Thread wxjmfauth
Le vendredi 20 décembre 2013 18:52:44 UTC+1, Martin Schöön a écrit : > This thread hasn't been close to Python for while now and should > > be shut down. But, it is actually kind of interesting since you > > debate possible mechanisms behind the behaviour of my Windows box > > at work: "Not re

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Travis Griggs
On Dec 20, 2013, at 8:00 AM, Mark Lawrence wrote: > A good point. Shall I write a PEP asking for a language change which > requires that that stupid = sign is replaced by a keyword reading something > like thenameonthelefthandsideisassignedtheobjectontherighthandside ? Or a symbol like :=. As

Re: Newbie question. Are those different objects ?

2013-12-20 Thread rurpy
On 12/20/2013 08:16 AM, dec...@msn.com wrote: > y = raw_input('Enter a number:') > print type y > y = float(raw_input('Enter a number:')) > print type y > > I'm assuming that y is an object. Rather than thinking that y "is" an object, it is more accurate to think of it as: y is a name that is "bo

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-20 Thread Mark Lawrence
On 20/12/2013 17:52, Martin Schöön wrote: Coming from many years of SUN Solaris experience I may be a bit spoiled when it comes to robustness :-) You never had the pleasure of working on VMS then? :) -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for

Re: Newbie question. Are those different objects ?

2013-12-20 Thread 88888 Dihedral
On Saturday, December 21, 2013 1:10:37 AM UTC+8, rusi wrote: > On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: > > > On 20/12/2013 15:34, rusi wrote: > > > > On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > > > >> y = raw_input('Enter a number:') >

Re: GUI:-please answer want to learn GUI programming in python , how should i proceed.

2013-12-20 Thread Martin Schöön
This thread hasn't been close to Python for while now and should be shut down. But, it is actually kind of interesting since you debate possible mechanisms behind the behaviour of my Windows box at work: "Not responding" is happening to me daily for any application including Microsoft's own Offic

Re: Why Python is like C++

2013-12-20 Thread Serhiy Storchaka
20.12.13 16:19, Roy Smith написав(ла): http://xkcd.com/1306/ QBASIC$, not $QBASIC. -- https://mail.python.org/mailman/listinfo/python-list

Re: Struggling with unittest discovery - how to structure my project test suite

2013-12-20 Thread Serhiy Storchaka
20.12.13 16:47, Paul Moore написав(ла): What's the best way of structuring my projects so that: 1. I can run all the tests easily on demand. 2. I can run just the functional or unit tests when needed. python -m unittest discover -s tests/functional python -m unittest discover tests/functional

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Mark Lawrence
On 20/12/2013 17:10, rusi wrote: On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: On 20/12/2013 15:34, rusi wrote: On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:'))

Re: Newbie question. Are those different objects ?

2013-12-20 Thread rusi
On Friday, December 20, 2013 9:30:22 PM UTC+5:30, Mark Lawrence wrote: > On 20/12/2013 15:34, rusi wrote: > > On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > >> y = raw_input('Enter a number:') > >> print type y > >> y = float(raw_input('Enter a number:')) > >> print type

Re: Newbie question. Are those different objects ?

2013-12-20 Thread bob gailer
On 12/20/2013 10:16 AM, dec...@msn.com wrote: print type y That line will give you a syntax error. -- https://mail.python.org/mailman/listinfo/python-list

Re: Newbie question. Are those different objects ?

2013-12-20 Thread Mark Lawrence
On 20/12/2013 15:34, rusi wrote: On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:')) print type y I'm assuming that y is an object. I'm also assuming that the second and the first y are

wxPython latest

2013-12-20 Thread Mark Lawrence
As wxPython was mentioned a week ago some of you may be interested in these http://article.gmane.org/gmane.comp.python.wxpython.devel/5680 http://article.gmane.org/gmane.comp.python.wxpython.devel/5675 -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for

Re: Newbie question. Are those different objects ?

2013-12-20 Thread rusi
On Friday, December 20, 2013 8:46:31 PM UTC+5:30, dec...@msn.com wrote: > y = raw_input('Enter a number:') > print type y > y = float(raw_input('Enter a number:')) > print type y > I'm assuming that y is an object. I'm also assuming that the second and the > first y are different objects because

Re: Newbie question. Are those different objects ?

2013-12-20 Thread random832
On Fri, Dec 20, 2013, at 10:16, dec...@msn.com wrote: > The second time we type print type y, how does the program knows which > one of the y's it refers to ? Is the first y object deleted ? y does not refer to the first object anymore after you've assigned the second object to it. In CPython, if

Newbie question. Are those different objects ?

2013-12-20 Thread dec135
y = raw_input('Enter a number:') print type y y = float(raw_input('Enter a number:')) print type y I'm assuming that y is an object. I'm also assuming that the second and the first y are different objects because they have different types. The second time we type print type y, how does the progra

Struggling with unittest discovery - how to structure my project test suite

2013-12-20 Thread Paul Moore
I'm trying to write a project using test-first development. I've been basically following the process from "Test-Driven Web Development with Python" (excellent book, by the way) but I'm writing a command line application rather than a web app, so I'm having to modify some bits as I go along. Not

Why Python is like C++

2013-12-20 Thread Roy Smith
http://xkcd.com/1306/ -- https://mail.python.org/mailman/listinfo/python-list

Re: How to use the method loadtxt() of numpy neatly?

2013-12-20 Thread Peter Otten
chao dong wrote: > HI, everybody. When I try to use numpy to deal with my dataset in the > style of csv, I face a little problem. > > In my dataset of the csv file, some columns are string that can not > convert to float easily. Some of them can ignore, but other columns I >

Re: How to use the method loadtxt() of numpy neatly?

2013-12-20 Thread rusi
On Friday, December 20, 2013 11:18:53 AM UTC+5:30, chao dong wrote: > HI, everybody. When I try to use numpy to deal with my dataset in the style > of csv, I face a little problem. > In my dataset of the csv file, some columns are string that can not > convert to float easily. Some of them c

Re: Determining whether a glyph is available in Tkinter

2013-12-20 Thread wxjmfauth
Le vendredi 20 décembre 2013 00:10:58 UTC+1, wmcb...@gmail.com a écrit : > On Monday, December 16, 2013 10:58:06 PM UTC-5, Terry Reedy wrote: > > > In this case, I already know that the glyphs I chose work with the default > fonts for OS X 10.4+ and Windows 7+, but not for (for example) Win XP

Re: PDFMiner install question

2013-12-20 Thread Andreas Perstinger
Jason Mellone wrote: >I get the following error: >PS C:\USERS\Python27> .\python.exe .\MyTest.py >Traceback (most recent call last): > File ".\MyTest.py", line 4, in >from pdfminer.pdfpage import PDFTextExtractionNotAllowed >ImportError: cannot import name PDFTextExtractionNotAllowed > > >If

Re: Reading csv file

2013-12-20 Thread Igor Korot
Thank you, Peter. About OOP: company policy, can't help it. They say it's easier to maintain and code. But it works now. On Thu, Dec 19, 2013 at 2:39 AM, Peter Otten <__pete...@web.de> wrote: > Igor Korot wrote: > >> Hi, Peter, >> Thank you for the great suggestion. >> >> I tried to implement yo