Re: method that can be called from a class and also from an instance

2012-11-23 Thread Peter Otten
Steven D'Aprano wrote: On Thu, 22 Nov 2012 16:51:27 +0100, Peter Otten wrote: Marc Aymerich wrote: Hi, I want to create a method within a class that is able to accept either a class or an instance. [...] Why would you overload a method that way? The use-case I have is that I

Re: Migrate from Access 2010 / VBA

2012-11-23 Thread Peter Otten
kgard wrote: Greetings: I am the lone developer of db apps at a company of 350+ employees. Everything is done in MS Access 2010 and VBA. I'm frustrated with the limitations of this platform and have been considering switching to Python. I've been experimenting with the language for a year

Re: Print value from array

2012-11-23 Thread Hans Mulder
On 22/11/12 19:44:02, Mike wrote: Hello, I am noob en python programing, i wrote a perl script for read from csv but now i wish print value but the value must be within double quote and I can not do this. For example now the output is: ma user@domain displayName Name SecondName

Pass parameters/globals to eval

2012-11-23 Thread esandin
I am trying to set the parameter 'a' below so that it can be used when I call eval: def gp_function(): ... return 1+a ... print eval(gp_function(), {'a':123, 'gp_function':gp_function}) Traceback (most recent call last): File stdin, line 1, in module File string, line 1, in module

Re: Pass parameters/globals to eval

2012-11-23 Thread Chris Angelico
On Fri, Nov 23, 2012 at 11:14 PM, esan...@gmail.com wrote: Why isn't 'a' defined? Shouldn't you be able to define the global variables with a dict passed to eval? Is there an other way to do this, beside the two obvious: defining 'a' before calling gp_function and using a as an argument in

Re: method that can be called from a class and also from an instance

2012-11-23 Thread Steven D'Aprano
On Fri, 23 Nov 2012 09:52:25 +0100, Peter Otten wrote: Steven D'Aprano wrote: http://code.activestate.com/recipes/577030/ Am I reading that right that you don't invoke method() as MyClass.method()? No. I give an example and explicitly state: You can use this class without

python3.3 - tk_setPalette bug?

2012-11-23 Thread Helmut Jarausch
Hi, AFAIK, this should work: import tkinter as Tk root= Tk.Tk() root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue') but python-3.3:0e4574595674+ gives Traceback (most recent call last): File Matr_Select.py, line 174, in module root.tk_setPalette(background =

Re: 10 sec poll - please reply!

2012-11-23 Thread Michael Herrmann
Dear all, the emails are getting kind of long so to ask you briefly: What do you think of splitting `type` into two functions `press` and `enter`? Their use cases are: press(CTRL + 'a') press(ENTER) press(ALT + 'f', 's') enter(Hello World!)

Re: python3.3 - tk_setPalette bug?

2012-11-23 Thread Peter Otten
Helmut Jarausch wrote: Hi, AFAIK, this should work: import tkinter as Tk root= Tk.Tk() root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue') but python-3.3:0e4574595674+ gives Traceback (most recent call last): File Matr_Select.py, line 174, in module

who is that...?!!

2012-11-23 Thread BV BV
who is that...?!! http://www.youtube.com/watch?v=SIADfS030qgfeature=BFalist=PLB95C1C59E12FBA96 thank you -- http://mail.python.org/mailman/listinfo/python-list

Re: 10 sec poll - please reply!

2012-11-23 Thread Michael Herrmann
Hi again, Steven's points and the feeling for `type` are very good and maybe the problems I mentioned can be ramified. I therefore opened a new thread to find out what the general public thinks about overwriting built-in functions such as `type` here:

ANN : occmodel v0.1.0

2012-11-23 Thread Runar Tenfjord
I am pleased to announce the first official release of occmodel (v0.1.0) and the releated libraries geotools/gltools. Description -- occmodel is a small library which gives a high level access to the OpenCASCADE modelling kernel. For most users a direct use of the OpenCASCADE modelling

RE: Getting a seeded value from a list

2012-11-23 Thread Prasad, Ramit
Steven D'Aprano wrote: On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: However, this still means that the player will see the exact same level regenerated every time, absolutely fresh. As previously stated in this thread, that's not usually a good thing for encounters,

Re: 10 sec poll - please reply!

2012-11-23 Thread Kwpolska
On Fri, Nov 23, 2012 at 2:42 PM, Michael Herrmann michael.herrm...@getautoma.com wrote: Dear all, the emails are getting kind of long so to ask you briefly: What do you think of splitting `type` into two functions `press` and `enter`? Their use cases are: press(CTRL + 'a')

Re: Is it bad style to override the built-in function `type`?

2012-11-23 Thread Roy Smith
In article d2e59ddf-d44c-44d9-91c5-539b03cfc...@googlegroups.com, Michael Herrmann michael.herrm...@getautoma.com wrote: do you think it's bad style to override the built-in function `type`? I'm co-developing a GUI automation library called Automa (http://www.getautoma.com) and 'type' would

Why queue.empty() returns False even after put() is called?

2012-11-23 Thread Peng Yu
Hi, The empty() returns True even after put() has been called. Why it is empty when there some items in it? Could anybody help me understand it? Thanks! ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat main.py #!/usr/bin/env python import multiprocessing queue =

Re: 10 sec poll - please reply!

2012-11-23 Thread Michael Herrmann
Hi, I see your concern with having two functions that have to be separately remembered... I personally would also be fine with type(), however some people are violently against it. I opened a new thread (https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.python/GjZ2hAS1Wyk) to ask

Re: Is it bad style to override the built-in function `type`?

2012-11-23 Thread Terry Reedy
On 11/23/2012 11:22 AM, Joel Goldstick wrote: On Fri, Nov 23, 2012 at 11:12 AM, Michael Herrmann michael.herrm...@getautoma.com mailto:michael.herrm...@getautoma.com wrote: Hi, do you think it's bad style to override the built-in function `type`? I'm co-developing a GUI

argparse -- mutually exclusive sets of arguments?

2012-11-23 Thread Roy Smith
My command either takes two positional arguments (in which case, both are required): $ command foo bar or the name of a config file (in which case, the positional arguments are forbidden): $ command --config file How can I represent this with argparse; add_mutually_exclusive_group() isn't

Re: Why queue.empty() returns False even after put() is called?

2012-11-23 Thread MRAB
On 2012-11-23 16:57, Peng Yu wrote: Hi, The empty() returns True even after put() has been called. Why it is empty when there some items in it? Could anybody help me understand it? Thanks! ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat main.py #!/usr/bin/env python import

Re: Why queue.empty() returns False even after put() is called?

2012-11-23 Thread Ian Kelly
On Fri, Nov 23, 2012 at 9:57 AM, Peng Yu pengyu...@gmail.com wrote: Hi, The empty() returns True even after put() has been called. Why it is empty when there some items in it? Could anybody help me understand it? Thanks! ~/linux/test/python/man/library/multiprocessing/Queue/empty$ cat

Re: argparse -- mutually exclusive sets of arguments?

2012-11-23 Thread Terry Reedy
On 11/23/2012 1:46 PM, Roy Smith wrote: My command either takes two positional arguments (in which case, both are required): $ command foo bar or the name of a config file (in which case, the positional arguments are forbidden): $ command --config file How can I represent this with argparse;

Re: Why queue.empty() returns False even after put() is called?

2012-11-23 Thread Cameron Simpson
On 23Nov2012 11:53, Ian Kelly ian.g.ke...@gmail.com wrote: | On Fri, Nov 23, 2012 at 9:57 AM, Peng Yu pengyu...@gmail.com wrote: | The empty() returns True even after put() has been called. Why it is | empty when there some items in it? Could anybody help me understand | it? Thanks! | |

Re: Is it bad style to override the built-in function `type`?

2012-11-23 Thread Cameron Simpson
On 23Nov2012 10:41, Michael Herrmann michael.herrm...@getautoma.com wrote: [...] | I know it's a common beginner's mistake to incautiously override | built-in functions. However, we put in a lot of research and have come to | the conclusion that, if Python had not already defined it, `type` would

Re: Getting a seeded value from a list

2012-11-23 Thread Chris Angelico
On Sat, Nov 24, 2012 at 3:27 AM, Prasad, Ramit ramit.pra...@jpmorgan.com wrote: Steven D'Aprano wrote: On Wed, 21 Nov 2012 14:41:24 +1100, Chris Angelico wrote: However, this still means that the player will see the exact same level regenerated every time, absolutely fresh. As previously

Re: 10 sec poll - please reply!

2012-11-23 Thread Steven D'Aprano
On Fri, 23 Nov 2012 05:42:22 -0800, Michael Herrmann wrote: Dear all, the emails are getting kind of long so to ask you briefly: What do you think of splitting `type` into two functions `press` and `enter`? This invites confusion as to the rules of when you can call `press` and when you

RE: Problem with subprocess.call and windows schtasks

2012-11-23 Thread Prasad, Ramit
Dave Angel wrote: On 11/20/2012 06:41 PM, Tom Borkin wrote: (Please don't top-post. Now we lose all the context) Using shlex, I now have this: #!\Python27\python import os, subprocess path = os.path.join(C:\\, Program Files, Apache Group, Apache2, htdocs, ccc, run_alert.py)

Re: argparse -- mutually exclusive sets of arguments?

2012-11-23 Thread Joshua Landau
On 23 November 2012 18:46, Roy Smith r...@panix.com wrote: My command either takes two positional arguments (in which case, both are required): $ command foo bar or the name of a config file (in which case, the positional arguments are forbidden): $ command --config file How can I

Re: argparse -- mutually exclusive sets of arguments?

2012-11-23 Thread Ian Kelly
On Fri, Nov 23, 2012 at 11:46 AM, Roy Smith r...@panix.com wrote: My command either takes two positional arguments (in which case, both are required): $ command foo bar or the name of a config file (in which case, the positional arguments are forbidden): $ command --config file How can

[issue16534] test_float failure on IA64 (HPUX)

2012-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Without having looked too hard, the many warnings are almost certainly from our definition of Py_NAN. That's been fixed in the default branch. I'm not sure whether it's worth backporting just to fix warnings. --

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry, it's my fault. Here is a patch which should fix the bug. -- nosy: +skrah Added file: http://bugs.python.org/file28082/test_unknown_option.patch ___ Python tracker rep...@bugs.python.org

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Actually 2.7 tests should not be broken, but this patch unify 2.7 and 3.x code. -- Added file: http://bugs.python.org/file28083/test_unknown_option-2.7.patch ___ Python tracker rep...@bugs.python.org

[issue4080] unittest: display time used by each test case

2012-11-23 Thread anatoly techtonik
anatoly techtonik added the comment: pyunit_time.patch is invalid - missing space on the last line. -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4080 ___

[issue16535] json encoder unable to handle decimal

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: The json module already has too many options. No need for yet one such specialized. class number_str(float): ... def __init__(self, o): ... self.o = o ... def __repr__(self): ... return str(self.o) ... def decimal_serializer(o):

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2012-11-23 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- nosy: +kristjan.jonsson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13475 ___ ___

[issue14803] Add feature to allow code execution prior to __main__ invocation

2012-11-23 Thread Kristján Valur Jónsson
Changes by Kristján Valur Jónsson krist...@ccpgames.com: -- nosy: +kristjan.jonsson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14803 ___ ___

[issue16531] Allow IPNetwork to take a tuple

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: How about ipaddress.IPv4Network((3232235520, 16)), ipaddress.IPv4Network((3232235520, 65535)) and ipaddress.IPv4Network((3232235520, 4294901760))? ipaddress.IPv4Address(3232235520) IPv4Address('192.168.0.0') ipaddress.IPv4Address(65535)

[issue13475] Add '-p'/'--path0' command line option to override sys.path[0] initialisation

2012-11-23 Thread Kristján Valur Jónsson
Kristján Valur Jónsson added the comment: Butting in here: Early on in the startup, a search is made for site.py using automatic sys.path settings. Do the suggestions here propose to override this? I know there is a -s flag, but all these flags start to be confusing. I have been looking for

[issue16535] json encoder unable to handle decimal

2012-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Judging by the discussion that Éric points to, and by the various stackoverflow questions on the topic ([1], [2]), this is a common enough need that I think it would make sense to have some support for it in the std. lib. There's a sense in which Decimal is

[issue11797] 2to3 does not correct reload

2012-11-23 Thread Berker Peksag
Berker Peksag added the comment: Here's a patch that adds tests and updates the documentation. -- nosy: +berker.peksag Added file: http://bugs.python.org/file28084/issue11797.diff ___ Python tracker rep...@bugs.python.org

[issue16532] AMD64 Windows 7 build failures

2012-11-23 Thread Jeremy Kloth
Jeremy Kloth added the comment: On Thu, Nov 22, 2012 at 3:11 PM, Antoine Pitrou rep...@bugs.python.org wrote: The AMD64 Windows 7 buildbot shows weird build failures in ctypes: http://buildbot.python.org/all/buildslaves/kloth-win64 The _ctypes_d.pyd was considered to be in use by the system

[issue4473] POP3 missing support for starttls

2012-11-23 Thread Lorenzo M. Catucci
Lorenzo M. Catucci added the comment: OK, I'm uploading poplib_03_starttls_v5.diff; I only changed the caps=self.capa() into caps = self.capa() in the @@ -352,21 +360,42 @@ class POP3: hunk. Thank you for pointing at the line; I tried to run pep8.py on poplib.py, but failed to find the line,

[issue4473] POP3 missing support for starttls

2012-11-23 Thread Lorenzo M. Catucci
Changes by Lorenzo M. Catucci lore...@sancho.ccd.uniroma2.it: Removed file: http://bugs.python.org/file28026/poplib_03_starttls_v4.diff ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4473 ___

[issue16491] try-except-raise-bug

2012-11-23 Thread Ezio Melotti
Ezio Melotti added the comment: Can you paste the traceback you get with IDLE and also try the same from the command line? -- type: - behavior ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16491

[issue16538] The docs doesn't describe MAKE_CLOSURE correctly

2012-11-23 Thread Daniel Urban
New submission from Daniel Urban: The documentation of the dis module describes the MAKE_CLOSURE opcode incorrectly. The description of MAKE_FUNCTION was updated in 242d3f8e8c50 (issue14349) to include the qualified name, but MAKE_CLOSURE wan't. A patch is attched. -- assignee:

[issue16538] The docs doesn't describe MAKE_CLOSURE correctly

2012-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5d1e7912e23e by Andrew Svetlov in branch '3.3': Issue #16538: correctly describe MAKE_CLOSURE in docs. http://hg.python.org/cpython/rev/5d1e7912e23e New changeset 8fff40a7c5b5 by Andrew Svetlov in branch 'default': Merge issue #16538: correctly

[issue16538] The docs doesn't describe MAKE_CLOSURE correctly

2012-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: Fixed. Thanks. -- nosy: +asvetlov resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16538

[issue16534] test_float failure on IA64 (HPUX)

2012-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: I wonder whether adding -fpeval=float to the CFLAGS would fix this. There's a lot of information at http://h21007.www2.hp.com/portal/site/dspp/menuitem.863c3e4cbcdc3f3515b49c108973a801?ciid=0008a22194f02110a22194f02110275d6e10RCRD but I don't know whether

[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread anatoly techtonik
New submission from anatoly techtonik: It is very annoying. Take this as an example. 'patch' is a module (library) that is meant to be used from other programs. Therefore it can not (should not) setup handlers for itself. import patch patch.PatchSet().parse('7745') No handlers could be

[issue16511] IDLE configuration file: blank height and width fields trip up IDLE

2012-11-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16511 ___ ___

[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread anatoly techtonik
anatoly techtonik added the comment: Forgot to mention that bundled NullHandler doesn't work in Python 2.7 and from what I can see it is not covered with tests for this version. Traceback (most recent call last): File stdin, line 1, in module File patch.py, line 124, in fromstring

[issue2454] sha and md5 fixer

2012-11-23 Thread Meador Inge
Meador Inge added the comment: I'm not sure how much this is needed considering hashlib has been around, since 2.5. I hope people aren't having to port from before then. Martin alluded to that when he opened the issue saying this wasn't necessary, but a nice to have. However, it has been

[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread anatoly techtonik
anatoly techtonik added the comment: Nevermind the last message - I was specifying NullHandler as a class, not as an instance. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16539 ___

[issue14273] distutils2: logging handler not properly initialized

2012-11-23 Thread anatoly techtonik
anatoly techtonik added the comment: More specifically, you need to copy NullHandler code if you want to run it with Python 2.x 2.7 -- nosy: +techtonik ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14273

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Ezio Melotti
Ezio Melotti added the comment: The new patch doesn't seem to be correct: without the patch: $ ./python -a -z Unknown option: -a Unknown option: -z usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... with the patch: $ ./python -a -z Unknown option: -a usage: ./python [option]

[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread Vinay Sajip
Vinay Sajip added the comment: This is not a valid issue. The approach to use is documented: http://docs.python.org/2.6/library/logging.html#configuring-logging-for-a-library http://docs.python.org/2.7/howto/logging.html#configuring-logging-for-a-library -- resolution: - invalid

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thanks, Ezio, for point. without the patch: $ ./python -a -z Unknown option: -a Unknown option: -z usage: ./python [option] ... [-c cmd | -m mod | file | -] [arg] ... This behavior isn't correct. Try also -E -a -z and -a -E -z (also with 3.3.0).

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: Added file: http://bugs.python.org/file28088/test_unknown_option_2-2.7.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16306 ___

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Ezio Melotti
Ezio Melotti added the comment: This behavior isn't correct. Shouldn't python report all the invalid flags passed? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16306 ___

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Should not. It happened unintentionally (and inconsistently). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16306 ___

[issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3

2012-11-23 Thread Jesús Cea Avión
Jesús Cea Avión added the comment: Could you possibly locate the problematic changeset? Could be doable by bisection. -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16529 ___

[issue5765] stack overflow evaluating eval(() * 30000)

2012-11-23 Thread Jesús Cea Avión
Changes by Jesús Cea Avión j...@jcea.es: -- nosy: +jcea ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5765 ___ ___ Python-bugs-list mailing list

[issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3

2012-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 23.11.2012 17:02, Jesús Cea Avión wrote: Could you possibly locate the problematic changeset? Could be doable by bisection. I'll try to find the changeset. There were only 4 checkins related to ceval.c since the 3.3.0 release, so one of those will

[issue16529] Compiler error when trying to compile ceval.c on OpenSUSE 11.3

2012-11-23 Thread Marc-Andre Lemburg
Marc-Andre Lemburg added the comment: On 23.11.2012 17:24, M.-A. Lemburg wrote: On 23.11.2012 17:02, Jesús Cea Avión wrote: Could you possibly locate the problematic changeset? Could be doable by bisection. I'll try to find the changeset. There were only 4 checkins related to ceval.c

[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Neil Girdhar
New submission from Neil Girdhar: When using sequence types polymorphically, range, list, and tuple are both iterable and subscriptable. Unfortunately, itertools.count, cycle, and repeat objects are not subscriptable, although this is not a hard change. Please consider making these objects

[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +rhettinger stage: - needs patch versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.5 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16540

[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Range, list, and tuple are iterables, but itertools.count, cycle, and repeat objects are iterators. Subscripting is not a part of iterator protocol. -- nosy: +serhiy.storchaka ___ Python tracker

[issue16306] Multiple error line for unknown command line parameter

2012-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset 6a79e3beb854 by Ezio Melotti in branch '2.7': #16306: report only the first unknown option and add more tests. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/6a79e3beb854 New changeset 654a628f5f00 by Ezio Melotti in branch '3.2':

[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Neil Girdhar
Neil Girdhar added the comment: Apologies if this is a bad question, but why do count, cycle, and repeat return iterators rather than iterables? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16540

[issue16474] More code coverage for imp module

2012-11-23 Thread Andrew Svetlov
Changes by Andrew Svetlov andrew.svet...@gmail.com: -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16474 ___ ___

[issue16537] Python’s setup.py raises a ValueError when self.extensions is empty

2012-11-23 Thread Éric Araujo
Éric Araujo added the comment: LGTM. -- nosy: +eric.araujo title: setup.py throws a ValueError when self.extensions is empty - Python’s setup.py raises a ValueError when self.extensions is empty ___ Python tracker rep...@bugs.python.org

[issue16526] Python does not cross compile properly

2012-11-23 Thread Éric Araujo
Éric Araujo added the comment: See also: http://bugs.python.org/issue3754 cross-compilation support for python build http://bugs.python.org/issue1006238 cross compile patch http://bugs.python.org/issue1597850 Cross compiling patches for MINGW (superseder of

[issue16519] site.venv() should use abspath(executable)

2012-11-23 Thread Éric Araujo
Changes by Éric Araujo mer...@netwok.org: -- nosy: +eric.araujo, vinay.sajip ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16519 ___ ___

[issue16477] tarfile fails to close file handles in case of exception

2012-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: LGTM -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16477 ___ ___ Python-bugs-list mailing

[issue16508] include the object type in the lists of documented types

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16508 ___ ___

[issue16509] sqlite3 docs do not explain check_same_thread

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ghaering stage: - needs patch versions: +Python 3.2, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16509 ___

[issue16518] add buffer protocol to glossary

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16518 ___ ___

[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Éric Araujo
Éric Araujo added the comment: The point of itertools is to implement building blocks for iterators, which are memory-efficient and can sometimes be infinite, contrary to sequences. -- nosy: +eric.araujo ___ Python tracker rep...@bugs.python.org

[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread anatoly techtonik
anatoly techtonik added the comment: I'd say this is a pretty valid issue with won't fix or workaround available resolution. The question - is the same behavior preserved for Python 3? -- resolution: invalid - wont fix status: closed - languishing

[issue16488] Add context manager support to epoll object

2012-11-23 Thread Andrew Svetlov
Andrew Svetlov added the comment: +0 for patch -- nosy: +asvetlov ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16488 ___ ___ Python-bugs-list

[issue16541] tk_setPalette doesn't accept keyword parameters

2012-11-23 Thread Helmut Jarausch
New submission from Helmut Jarausch: import tkinter as Tk root= Tk.Tk() root.tk_setPalette(background = 'AntiqueWhite1', foreground = 'blue') but python-3.3:0+ (3.3:27cb1a3d57c8+) gives Traceback (most recent call last): File Matr_Select.py, line 174, in module

[issue16542] http//bugs.python/joko.suwito

2012-11-23 Thread joko suwito
New submission from joko suwito: thank you -- messages: 176194 nosy: joko.suwito priority: normal severity: normal status: open title: http//bugs.python/joko.suwito ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16542

[issue16541] tk_setPalette doesn't accept keyword parameters

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There are two ways to fix this issue: 1. Fix tk_setPalette() (just wrap kw.items() with list() or tuple()). 2. Fix C implementation of _flatten() for work with any iterators. -- nosy: +gpolo, serhiy.storchaka stage: - needs patch type: compile error

[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +patch nosy: +chris.jerdonek stage: needs patch - patch review versions: +Python 3.2 Added file: http://bugs.python.org/file28089/issue16523.diff ___ Python tracker rep...@bugs.python.org

[issue16542] http//bugs.python/joko.suwito

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- resolution: - invalid stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16542 ___

[issue16540] Make itertools count, cycle, and repeat objects subscriptable like range.

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Apologies if this is a bad question, but why do count, cycle, and repeat return iterators rather than iterables? Actually they are iterables too. -- ___ Python tracker rep...@bugs.python.org

[issue16530] documentation of os.wait3

2012-11-23 Thread Roundup Robot
Roundup Robot added the comment: New changeset a2038edb51cd by Ezio Melotti in branch '2.7': #16530: the options arg of os.wait3 is required. http://hg.python.org/cpython/rev/a2038edb51cd New changeset 1cf1194a443e by Ezio Melotti in branch '3.2': #16530: the options arg of os.wait3 is

[issue16530] documentation of os.wait3

2012-11-23 Thread Ezio Melotti
Ezio Melotti added the comment: Fixed, thanks for the report! -- assignee: docs@python - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected status: open - closed versions: -Python 2.6, Python 3.1 ___ Python tracker

[issue16531] Allow IPNetwork to take a tuple

2012-11-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +easy nosy: +ezio.melotti stage: - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16531 ___

[issue16541] tk_setPalette doesn't accept keyword parameters

2012-11-23 Thread Guilherme Polo
Guilherme Polo added the comment: If doing list(kw.items()) works, I'm fine with that. If it does not, then ttk._format_optdict(kw) should. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16541

[issue16539] Turn off 'No handlers could be found for logger' message

2012-11-23 Thread Amaury Forgeot d'Arc
Amaury Forgeot d'Arc added the comment: Python 3 has exactly the same documentation: http://docs.python.org/3.3/howto/logging.html#configuring-logging-for-a-library -- nosy: +amaury.forgeotdarc resolution: wont fix - works for me status: languishing - closed

[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: +.. function:: attrgetter(attr[, attr2, attr3, ...]) Why not reword to use the *attr notation? It is even already being used below: + The function is equivalent to:: def attrgetter(*items): if any(not isinstance(item, str) for item in

[issue16543] Use positional arguments in PyArg_UnpackTuple

2012-11-23 Thread Ezio Melotti
New submission from Ezio Melotti: This came up in #16515. While using PyArg_UnpackTuple to parse the positional arguments in a function that receives both positional and keyword arguments, the error message returned when the number of arguments is incorrect is misleading, e.g.: max(foo=1)

[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Ezio Melotti
Ezio Melotti added the comment: I thought about that, but wanted to make a distinction between the form that accepts only 1 arg and returns an item and the form that receives 2+ args and returns a tuple. -- nosy: +ezio.melotti ___ Python tracker

[issue16515] TypeError message incorrect for max() with one keyword arg

2012-11-23 Thread Ezio Melotti
Ezio Melotti added the comment: I created #16543 for PyArg_UnpackTuple. Once that is fixed we can continue with this. -- dependencies: +Use positional arguments in PyArg_UnpackTuple ___ Python tracker rep...@bugs.python.org

[issue16543] Use positional arguments in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- nosy: +mark.dickinson ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16543 ___ ___

[issue16543] Use positional arguments in PyArg_UnpackTuple

2012-11-23 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: +(min == 1 ? : s), l); In second part of patch should be max. Reformat the code so that `min` and `(min == 1 ? : s)` will be in one line and it will be more clear. -- nosy: +serhiy.storchaka

[issue16523] attrgetter and itemgetter signatures in docs need cleanup

2012-11-23 Thread Chris Jerdonek
Chris Jerdonek added the comment: You can also make that distinction using *. For example: .. function:: attrgetter(attr, *attrs) or .. function:: attrgetter(attr) attrgetter(attr1, attr2, *attrs) (cf. http://docs.python.org/dev/library/functions.html#max ) Elsewhere we

[issue16543] Use positional arguments in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Now that I look at uses of PyArg_UnpackTuple, I'm wondering whether this needs to be fixed at all. Apart from `max` and `min`, do you know of any other cases where this gives a misleading error message? Almost all the uses I can find are for simple

[issue16543] Use positional arguments in PyArg_UnpackTuple

2012-11-23 Thread Mark Dickinson
Mark Dickinson added the comment: Of course, the 'arguments' - 'argument' fix would still be nice to have. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16543 ___

  1   2   >