Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Chris Angelico
On Sat, Jun 1, 2013 at 3:35 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Can you please tell me HOW TO GET RID OF ALL PYTHON SETUPS except 2.6 that is needed for system core and then just install 3.3.2? Nuke the hard drive from orbit. It's the only way to be sure. also why cant i install

Re: netcdF4 variables

2013-06-01 Thread Andreas Perstinger
On 01.06.2013 05:30, Sudheer Joseph wrote: some hing like a list xx=nc,variables[:] should get me all variable names with out other surrounding stuff?? In [4]: ncf.variables Out[4]: OrderedDict([(u'LON', netCDF4.Variable object at 0x254aad0), [SNIP] It looks like variables is an OrderedDict.

RE: Short-circuit Logic

2013-06-01 Thread Carlos Nepomuceno
From: steve+comp.lang.pyt...@pearwood.info Subject: Re: Short-circuit Logic Date: Fri, 31 May 2013 08:45:13 + To: python-list@python.org On Fri, 31 May 2013 17:09:01 +1000, Chris Angelico wrote: On Fri, May 31, 2013 at 3:13 PM, Steven D'Aprano

Re: Apache and suexec issue that wont let me run my python script

2013-06-01 Thread Νικόλαος Κούρας
Τη Σάββατο, 1 Ιουνίου 2013 8:38:17 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: You posted it FIFTEEN HOURS AGO on a low-traffic forum. Sheesh! Learn a little patience. I think this is enough time for to get an answer, i dont think so meone would answer from there but if you know some other

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Νικόλαος Κούρας
Τη Σάββατο, 1 Ιουνίου 2013 9:18:26 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: That would require that the repo have a 3.3.2 build in it. I don't know the Red Hat / CentOS policies there, but I know Debian stable wouldn't have anything so new - it takes time to test things. Is there a way

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Chris Angelico
On Sat, Jun 1, 2013 at 5:51 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Σάββατο, 1 Ιουνίου 2013 9:18:26 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: That would require that the repo have a 3.3.2 build in it. I don't know the Red Hat / CentOS policies there, but I know Debian stable

Re: Apache and suexec issue that wont let me run my python script

2013-06-01 Thread Chris Angelico
On Sat, Jun 1, 2013 at 5:49 PM, Νικόλαος Κούρας nikos.gr...@gmail.com wrote: Τη Σάββατο, 1 Ιουνίου 2013 8:38:17 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: You posted it FIFTEEN HOURS AGO on a low-traffic forum. Sheesh! Learn a little patience. I think this is enough time for to get an

RE: Python Magazine

2013-06-01 Thread Carlos Nepomuceno
Date: Fri, 31 May 2013 04:11:06 -0700 Subject: Re: Python Magazine From: rama29...@gmail.com To: python-list@python.org Hello all, Was busy with work. Finally finished the job of registering the domain name. Will be live soon. The url is

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Cameron Simpson
On 01Jun2013 00:51, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= nikos.gr...@gmail.com wrote: | Τη Σάββατο, 1 Ιουνίου 2013 9:18:26 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: | That would require that the repo have a 3.3.2 build in it. I don't | know the Red Hat / CentOS policies there, but I

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Νικόλαος Κούρας
Τη Σάββατο, 1 Ιουνίου 2013 11:21:14 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: On 01Jun2013 00:51, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= nikos.gr...@gmail.com wrote: | Τη Σάββατο, 1 Ιουνίου 2013 9:18:26 π.μ. UTC+3, ο χρήστης Chris Angelico έγραψε: | That would require that the

Re: Apache and suexec issue that wont let me run my python script

2013-06-01 Thread Νικόλαος Κούρας
I was searchign all night long yesterday an i didn manged to get this workign. Please if someoen is expreinces with linux just help me out here a but. -- http://mail.python.org/mailman/listinfo/python-list

Re: Apache and suexec issue that wont let me run my python script

2013-06-01 Thread Alain Ketterlin
Νικόλαος Κούρας nikos.gr...@gmail.com writes: [...] [Thu May 30 15:29:33 2013] [error] [client 46.12.46.11] suexec failure: could not open log file Here is a link to suexec documentation (at least some version of it, this is the second link provided by google):

Re: Apache and suexec issue that wont let me run my python script

2013-06-01 Thread Νικόλαος Κούρας
Τη Σάββατο, 1 Ιουνίου 2013 12:03:47 μ.μ. UTC+3, ο χρήστης Alain Ketterlin έγραψε: http://httpd.apache.org/docs/2.2/suexec.html Read this and check your setup to see if it matches. I have already seen this Alan thank you and tried the command i mentioned but with no successfull result

Re: netcdF4 variables

2013-06-01 Thread Sudheer Joseph
Thank you very much it works for me. with best regards, Sudheer On Saturday, June 1, 2013 12:51:01 PM UTC+5:30, Andreas Perstinger wrote: On 01.06.2013 05:30, Sudheer Joseph wrote: some hing like a list xx=nc,variables[:] should get me all variable names with out other surrounding

Re: How to Begin Web Development with Python ?

2013-06-01 Thread Giorgos Tzampanakis
Chitrank Dixit wrote: Hello Python developers I have learnt python and used it for various purposes for scietific computing using sage and GUI development using Tkinter and lots more. I want to start web development using python My goal is to learn the web development in python from the

Re: Python toplevel in a Web page

2013-06-01 Thread Giorgos Tzampanakis
On 2013-05-30, Franck Ditter wrote: Hello, I wonder if I can find some source code example of a Python 3 toplevel box in a Web page. Something simple, no mySQL, no Django hammer, etc. Just the basics of the technology to get the content of a small text editor in which the user writes some

Re: Cutting a deck of cards

2013-06-01 Thread Giorgos Tzampanakis
On 2013-05-26, RVic wrote: Suppose I have a deck of cards, and I shuffle them import random cards = [] decks = 6 cards = list(range(13 * 4 * decks)) random.shuffle(cards) So now I have an array of cards. I would like to cut these cards at some random point (between 1 and 13 * 4 * decks

Re: Python Magazine

2013-06-01 Thread 88888 Dihedral
Steven D'Aprano於 2013年5月26日星期日UTC+8上午11時50分31秒寫道: On Sat, 25 May 2013 21:54:43 -0400, Roy Smith wrote: Of course not every IPv6 endpoint will be able to talk to every other IPv6 endpoint, even if the both have globally unique addresses. But, the access controls will be

Changing filenames from Greeklish = Greek (subprocess complain)

2013-06-01 Thread Νικόλαος Κούρας
/home/nikos/public_html/cgi-bin/metrites.py in () 217 template = htmldata + counter 218 elif page.endswith('.py'): = 219 htmldata = subprocess.check_output( '/home/nikos/public_html/cgi-bin/' + page ) 220 template =

problem loading Python PIL module

2013-06-01 Thread Elliot Perlman
Hi, I have a Python program which worked successfully on several PCs using version 2.2 and showed videos using the PIL module version 1.1.5 . (All the rest works but the videos.) When I try to install the downloaded PIL module on my current laptop PC, I get the error message Could not create

Re: Cutting a deck of cards

2013-06-01 Thread Joshua Landau
On 31 May 2013 12:56, Lee Crocker leedanielcroc...@gmail.com wrote: Why on Earth would you want to? Cutting a deck makes no sense in software. Randomize the deck properly (Google Fisher-Yates) and start dealing. Cutting the deck will not make it any more random, True and in fact will

Re: Can anyone please help me in understanding the following python code

2013-06-01 Thread rusi
On May 30, 2:48 pm, bhk...@gmail.com wrote: Code : - def mergeSort(alist):     print(Splitting ,alist)     if len(alist)1:         mid = len(alist)//2         lefthalf = alist[:mid]         righthalf = alist[mid:]         mergeSort(lefthalf)         mergeSort(righthalf)        

Re: Future standard GUI library

2013-06-01 Thread Wolfgang Keller
A GUI that can not be used without taking the ten fingers off the keyboard is indeed entirely unusable for any half-proficient screenworker. And anyone doing actual productive screenwork every day for more than just a few months will inevitably (have to) get proficient (unless completely

Re: Future standard GUI library

2013-06-01 Thread Chris Angelico
On Sun, Jun 2, 2013 at 4:18 AM, Wolfgang Keller felip...@gmx.net wrote: A GUI that can not be used without taking the ten fingers off the keyboard is indeed entirely unusable for any half-proficient screenworker. And anyone doing actual productive screenwork every day for more than just a

Re: Create a file in /etc/ as a non-root user

2013-06-01 Thread Denis McMahon
On Fri, 31 May 2013 02:12:58 -0700, BIBHU DAS wrote: Any Idea how to create a file in /etc as non-root user?Can i use umask or chmod...confused If you don't have root access, you probably shouldn't be trying to write in /etc. If you need to write in /etc, explain to the sysadmin why you

Re: Future standard GUI library

2013-06-01 Thread Terry Jan Reedy
On 6/1/2013 4:46 PM, Chris Angelico wrote: On Sun, Jun 2, 2013 at 4:18 AM, Wolfgang Keller felip...@gmx.net wrote: And by screenworkers I didn't refer to programmers. Those people rarely have to use the stuff that they implement. Of course not, programmers never use software they've

Re: How to Begin Web Development with Python ?

2013-06-01 Thread Modulok
I have learnt python and used it for various purposes for scietific computing using sage and GUI development using Tkinter and lots more. I want to start web development using python My goal is to learn the web development in python from the basic level and understand the big web

Need to modify a Python Gui

2013-06-01 Thread matt . doolittle33
Hi everybody, I have a Python GUI that displays some data in labeled fields. As new data comes in the fields clear and the old data is lost. I need to make a text box in the GUI that will display the cleared data in a scrolling list. I also need this scrolling list to be logged to a file in

Re: Create a file in /etc/ as a non-root user

2013-06-01 Thread rusi
On Jun 2, 2:19 am, Denis McMahon denismfmcma...@gmail.com wrote: On Fri, 31 May 2013 02:12:58 -0700, BIBHU DAS wrote: Any Idea how to create a file in /etc as non-root user?Can i use umask or chmod...confused If you don't have root access, you probably shouldn't be trying to write in

xsd:anyType parameter in suds!

2013-06-01 Thread Tamer Higazi
Hi people! I have a problem passing an xs:anyType Parameter in suds. The original sample is an application, where a PHP Array is being passed for the remoted method. What is the same type in python to accomplish the task?! doc with sample: http://kasapi.kasserver.com/dokumentation/?open=soap

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Cameron Simpson
On 01Jun2013 01:30, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= nikos.gr...@gmail.com wrote: | Τη Σάββατο, 1 Ιουνίου 2013 11:21:14 π.μ. UTC+3, ο χρήστης Cameron Simpson έγραψε: | On 01Jun2013 00:51, =?utf-8?B?zp3Or866zr/PgiDOk866z4EzM866?= nikos.gr...@gmail.com wrote: | | Τη Σάββατο, 1 Ιουνίου

Re: Too many python installations. Should i remove them all and install the latest?

2013-06-01 Thread Chris Angelico
On Sun, Jun 2, 2013 at 2:36 PM, Cameron Simpson c...@zip.com.au wrote: This is not a recommendation one way or another re CentOS versus Ubunutu; it is a recommendation not to change without a better reason. Agreed. I happen to like Debian-family Linuxes, having spent most of my Linux time on

[issue13123] bdist_wininst uninstaller does not remove pycache directories

2013-06-01 Thread Matt Wilkie
Changes by Matt Wilkie map...@gmail.com: -- nosy: +Matt.Wilkie ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13123 ___ ___ Python-bugs-list

[issue4636] bdist_wininst installer with install script raises exception

2013-06-01 Thread Matt Wilkie
Matt Wilkie added the comment: I confirm this is happening with 3.2.4 from an installer generated in 2.7.4 (64bit Win7, 32bit python): https://pypi.python.org/pypi/leo/4.11.devel-build-5802 -- nosy: +Matt.Wilkie ___ Python tracker

[issue17973] FAQ entry for: '+=' on a list inside tuple both succeeds and raises an exception

2013-06-01 Thread Andy Chugunov
Andy Chugunov added the comment: Thank you guys for all the efforts you put in solving and answering this. Just so that we're clear. It is perfectly legitimate to extend lists withing tuples. It just doesn't seem possible to make augmented assignment and simple assignment handle this

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-06-01 Thread Charles-François Natali
Charles-François Natali added the comment: To reproduce the issue, try this: # echo hostname /proc/sys/kernel/hostname the locale encoding + surrogateescape error handler Sounds reasonable. -- nosy: +neologix ___ Python tracker

[issue18113] Memory leak in curses.panel

2013-06-01 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Extension Modules keywords: +easy nosy: +serhiy.storchaka stage: - needs patch type: - behavior versions: +Python 3.4 ___ Python tracker rep...@bugs.python.org

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-06-01 Thread Dominik Richter
Dominik Richter added the comment: @neologix: (with current hostname showing at the left of my prompt) none:~ # echo hât /proc/sys/kernel/hostname hât:~ # hostname hât -- ___ Python tracker rep...@bugs.python.org

[issue18109] os.uname() crashes if hostname contains non-ascii characters

2013-06-01 Thread Dominik Richter
Dominik Richter added the comment: /off: nevermind, wasn't directed at me -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18109 ___ ___

[issue18110] Nested set comprehensions in class scope fail

2013-06-01 Thread Eric Wieser
Changes by Eric Wieser wieser.eric+py...@gmail.com: -- status: closed - open ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18110 ___ ___

[issue18110] Nested set comprehensions in class scope fail

2013-06-01 Thread Eric Wieser
Eric Wieser added the comment: This is not at first glance, a duplicate of 3692 - in that case, the list comprehension is referring to another class variable. Most notably, that describes a behavioural change introduced by python 3 - in this case, python 3 handles it correctly - there's a bug

[issue1772673] Replacing char* with const char*

2013-06-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The patch is outdated. Some function prototypes were changed in issue9369, some were changed before. Here is a new patch. It adds const qualifier to following public functions: PyObject_DelAttrString, PyObject_HasAttrString, PyObject_GetAttrString,

[issue18020] html.escape 10x slower than cgi.escape

2013-06-01 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- assignee: - ezio.melotti stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18020 ___

[issue17973] FAQ entry for: '+=' on a list inside tuple both succeeds and raises an exception

2013-06-01 Thread R. David Murray
R. David Murray added the comment: I believe that summary is correct. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17973 ___ ___

[issue16450] test_missing_localfile masks problems in urlopen

2013-06-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 60c195e89c88 by Senthil Kumaran in branch '2.7': Fix #16450 test_missing_localfile testcase fails on misconfigured hostname. http://hg.python.org/cpython/rev/60c195e89c88 -- nosy: +python-dev ___ Python

[issue16450] test_missing_localfile masks problems in urlopen

2013-06-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: I noticed this only after I had a misconfigured hostname on my mac. Fixing my hostname of course solved the problem, but in any case, changed the tests so that we wont be baffled by the unexpected (and misdirected error msg) from test for misconfigured

[issue17967] urllib2.open failed to access a url when a perent directory of the url is permission denied

2013-06-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0a544bb539e6 by Senthil Kumaran in branch '2.7': Fix #17967: For ftp urls CWD to target instead of hopping to each directory http://hg.python.org/cpython/rev/0a544bb539e6 New changeset dbfbdf2b5c19 by Senthil Kumaran in branch '3.3': Fix #17967:

[issue17967] urllib2.open failed to access a url when a perent directory of the url is permission denied

2013-06-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: Thanks Zhaoqifa for steps to configure the ftp with acl. I could reproduce it manually and fix it by changes to the urllib.request code. Unfortunately, we dont have rigorous tests for ftp handling in urllib module. That's noted in test_urllib2net module too.

[issue17967] urllib2.open failed to access a url when a perent directory of the url is permission denied

2013-06-01 Thread Senthil Kumaran
Senthil Kumaran added the comment: Reopening: This change is seeing problems with Windows Buildbot http://buildbot.python.org/all/builders/x86%20XP-4%203.x/builds/8643/steps/test/logs/stdio -- status: closed - open ___ Python tracker

[issue17683] socket.getsockname() inconsistent return type with AF_UNIX

2013-06-01 Thread Charles-François Natali
Changes by Charles-François Natali cf.nat...@gmail.com: -- nosy: +haypo ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17683 ___ ___

[issue18066] Remove SGI-specific code from pty.py

2013-06-01 Thread A.M. Kuchling
Changes by A.M. Kuchling li...@amk.ca: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18066 ___

[issue18066] Remove SGI-specific code from pty.py

2013-06-01 Thread Roundup Robot
Roundup Robot added the comment: New changeset a678f139510b by Andrew Kuchling in branch 'default': #18066: remove vestigial code depending on the sgi module http://hg.python.org/cpython/rev/a678f139510b -- nosy: +python-dev ___ Python tracker

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: To me, there are two independent improvements: using i and hence msg to identify the erroneous dup, and using .subTest to test all dups. I would combine ideas from both the first two patches to do both. 1. a fancy formatted message would be more useful with

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-06-01 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: subTest() serves two purposes: identify the test case and continue testing oother test cases after a fail. For first purpose subTest() is not well suitable in these tests, becouse we have no a string which determine a test. Second purpose is not relevant to

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-06-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: becouse we have no a string which determine a test. The original loop could be have been written as (or be changed to) for label, dup in [ ('odcopy', od.copy()), ('copycopy', copy.copy(words)), and so on ] and the label used to

[issue14621] Hash function is not randomized properly

2013-06-01 Thread Donald Stufft
Changes by Donald Stufft donald.stu...@gmail.com: -- nosy: +dstufft ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14621 ___ ___ Python-bugs-list

[issue11959] smtpd cannot be used without affecting global state

2013-06-01 Thread Vinay Sajip
Changes by Vinay Sajip vinay_sa...@yahoo.co.uk: Added file: http://bugs.python.org/file30441/d7c50c15468d.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11959 ___

[issue18050] embedded interpreter or virtualenv fails with ImportError: cannot import name MAXREPEAT

2013-06-01 Thread H Xu
Changes by H Xu h...@topbug.net: -- nosy: +xuhdev ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18050 ___ ___ Python-bugs-list mailing list

[issue11959] smtpd cannot be used without affecting global state

2013-06-01 Thread Vinay Sajip
Vinay Sajip added the comment: Patch now updated to revert asyncore changes. The changes are now: smtpd.py - changed SMTPChannel and SMTPServer to accept map argument test_logging.py - removed subclassed SMTPChannel, not needed since the base SMTPChannel class now accepts a map, and

[issue15903] Make rawiobase_read() read directly to bytes object

2013-06-01 Thread Dwight Guth
Dwight Guth added the comment: I was programming something today and thought I should let you know I came across a situation where the current behavior of this function is able to expose what seems to be raw memory to the user. import io class A(io.RawIOBase): def readinto(self, b):

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Nikolaus Rath
New submission from Nikolaus Rath: [0] nikratio@vostro:~/tmp$ cat bugme.py #!python import getpass import warnings warnings.simplefilter('default') getpass.getpass(What's up?) [0] nikratio@vostro:~/tmp$ python3 --version Python 3.3.2 [0] nikratio@vostro:~/tmp$ python3 bugme.py

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Alex Gaynor
Alex Gaynor added the comment: Attached patch should fix this issue. -- keywords: +patch nosy: +alex Added file: http://bugs.python.org/file30442/issue18116.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18116

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Nikolaus Rath
Nikolaus Rath added the comment: No, it doesn't. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18116 ___ ___ Python-bugs-list mailing list

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Alex Gaynor
Alex Gaynor added the comment: Are you sure you applied it correctly? With and without: Alexanders-MacBook-Pro:cpython alex_gaynor$ ./python.exe x.py What's up? Alexanders-MacBook-Pro:cpython alex_gaynor$ hg revert --all --no-backup reverting Lib/getpass.py Alexanders-MacBook-Pro:cpython

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Nikolaus Rath
Nikolaus Rath added the comment: Yes, I'm pretty sure: [0] nikratio@vostro:~/tmp$ cp /usr/lib/python3.3/getpass.py . [0] nikratio@vostro:~/tmp$ patch -p2 issue18116.diff patching file getpass.py Hunk #1 succeeded at 57 (offset -1 lines). [0] nikratio@vostro:~/tmp$ python3 bugme.py

[issue17855] Implement introspection of logger hierarchy

2013-06-01 Thread Brandon Craig Rhodes
Brandon Craig Rhodes added the comment: Adding an entirely separate API for introspection strikes me as counter-productive — instead of merely having to maintain the logging API that you already maintain, you will additionally now have an entirely separate and second API that also has to be

[issue18111] Add a default argument to min max

2013-06-01 Thread Julian Berman
Julian Berman added the comment: Thanks for finding that, I thought there was an issue that came out of that p-i thread but couldn't find it. I'd like to be more concrete, but calling max on an iterable seems concrete enough to me. If you'd like to know more though, personally I've wanted

[issue18111] Add a default argument to min max

2013-06-01 Thread R. David Murray
R. David Murray added the comment: So you aren't really asking for a default, you are asking for a version of max/min that returns a sentinel instead of raising an error on an empty list. You could just write utility function that has a try/except in it. I'm not sure it is worth complicating

[issue18111] Add a default argument to min max

2013-06-01 Thread Julian Berman
Julian Berman added the comment: Yes that's a good description. I'm not sure the type of exception is the thing to look at as much as the behavior, I.e. I think next() is a good precedent. And it's not really pleasant to do this with a try/except. Of course everything's possible, but to catch

[issue18106] There are unused variables in Lib/test/test_collections.py

2013-06-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: I redo the test as Terry J. Reedy suggested. I use label in loop, utilize subTest receiving label parameter, and pass messages to only necessary asserts. So roughly if the test fails, we would get something like this:

[issue18116] getpass.getpass() triggers ResourceWarning

2013-06-01 Thread Vajrasky Kok
Vajrasky Kok added the comment: This bug happens in Python 3.4 as well. [sky@localhost cpython]$ ./python --version Python 3.4.0a0 [sky@localhost cpython]$ ./python /tmp/bugme.py /home/sky/Code/python/programming_language/cpython/Lib/os.py:1025: ResourceWarning: unclosed file _io.FileIO name=3

[issue18111] Add a default argument to min max

2013-06-01 Thread R. David Murray
R. David Murray added the comment: I don't think there's any other way to get a ValueError out of min/max, but I haven't actually looked at the code to check. Of course, if we want people to rely on that, we'd need to document it. 'next's default is used to return a sentinel when the list is

[issue18111] Add a default argument to min max

2013-06-01 Thread Julian Berman
Julian Berman added the comment: It's not exactly the same of course, but calling next on a thing that might be empty would be somewhat close, and also is replacing an exception with a sentinel (an exception that is much easier to differentiate). You can always get a ValueError out of