Re: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)

2013-05-30 Thread Chris McDonough
On Fri, 2013-05-31 at 03:05 +0200, Łukasz Langa wrote: > On 31 maj 2013, at 01:51, Łukasz Langa wrote: > > Back to the point, though. I don't feel we should complicate the > code, tests and documentation by introducing special handling > for methods. In terms of pure type-driven single dispatch,

Re: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)

2013-05-30 Thread Łukasz Langa
On 31 maj 2013, at 01:51, Łukasz Langa wrote: > On 31 maj 2013, at 01:47, Łukasz Langa wrote: > >> class State: >>def __init__(self): >>self.add.register(int, self.add_int) > > Ouch, I realized this is wrong just after I hit "Send". > self.add is a staticmethod so this registration

Re: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)

2013-05-30 Thread Łukasz Langa
On 31 maj 2013, at 01:47, Łukasz Langa wrote: > class State: >def __init__(self): >self.add.register(int, self.add_int) Ouch, I realized this is wrong just after I hit "Send". self.add is a staticmethod so this registration will overload on every instance. Which is obviously bad.

Re: [Python-Dev] PEP 443 - Single-dispatch generic functions (including ABC support)

2013-05-30 Thread Łukasz Langa
On 29 maj 2013, at 04:40, Nick Coghlan wrote: > I expect we will see improved tools for integrating class based > dispatch and generic function dispatch in the future, but we should > *not* try to engineer a solution up front. Doing so would involve too > much guessing about possible use cases, r

Re: [Python-Dev] performance testing recommendations in devguide

2013-05-30 Thread Ezio Melotti
Hi, On Wed, May 29, 2013 at 9:00 PM, Eric Snow wrote: > ... > > What would be important to say in the devguide regarding Python > performance and testing it? In the devguide I would only add information that are specific to benchmarking the interpreter. A separate "Benchmarking HOWTO" that cover

Re: [Python-Dev] Segmentation fault on 3.4 with --pydebug

2013-05-30 Thread Łukasz Langa
On 30 maj 2013, at 14:45, Ronald Oussoren wrote: > Issue #18075 contains a patch. I probably won't have time to commit until > sunday, but feel free to apply the patch yourself :-) I did just that. Fixed, thanks! -- Best regards, Łukasz Langa WWW: http://lukasz.langa.pl/ Twitter: @llanga IRC

Re: [Python-Dev] Segmentation fault on 3.4 with --pydebug

2013-05-30 Thread Benjamin Peterson
2013/5/30 Łukasz Langa : > This happens after Benjamin's changes in 83937. Anybody else seeing this? Remember you need the hash to fully identify hg changesets. :) > > Intel i5 2.4 GHz, Mac OS X 10.8.3, clang > > $ hg up default > $ make distclean > $ MACOSX_DEPLOYMENT_TARGET=10.8 ./configure --w

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-30 Thread Ron Adam
On 05/30/2013 03:34 AM, Mark Shannon wrote: On 29/05/13 01:14, Brett Cannon wrote: On Tue, May 28, 2013 at 5:40 PM, Antoine Pitrou wrote: On Tue, 28 May 2013 23:29:46 +0200 (CEST) brett.cannon wrote: +.. class:: ModuleManager(name) + +A :term:`context manager` which provides the mod

Re: [Python-Dev] Segmentation fault on 3.4 with --pydebug

2013-05-30 Thread Ronald Oussoren
On 30 May, 2013, at 13:08, Łukasz Langa wrote: > This happens after Benjamin's changes in 83937. Anybody else seeing this? > > Intel i5 2.4 GHz, Mac OS X 10.8.3, clang > > $ hg up default > $ make distclean > $ MACOSX_DEPLOYMENT_TARGET=10.8 ./configure --with-pydebug > $ make > $ ./python.exe

Re: [Python-Dev] Segmentation fault on 3.4 with --pydebug

2013-05-30 Thread a . cavallo
What's the stack trace? $> gdb --args ./python.exe -Wd -m test.regrtest test_exceptions and once in gdb: gdb> bt That should point on where it happened. I hope this help On 2013-05-30 13:08, Łukasz Langa wrote: This happens after Benjamin's changes in 83937. Anybody else seeing this?

Re: [Python-Dev] Segmentation fault on 3.4 with --pydebug

2013-05-30 Thread Dmitriy Baranov
No for me: $ ./python -Wd -m test.regrtest test_exceptions [1/1] test_exceptions 1 test OK. $ uname -a Linux 3.2.0-32-generic #51-Ubuntu SMP Wed Sep 26 21:32:50 UTC 2012 i686 i686 i386 GNU/Linux Please look at issue18075 2013/5/30 Łukasz Langa : > This happens after Benjamin's changes in 83937. A

[Python-Dev] Segmentation fault on 3.4 with --pydebug

2013-05-30 Thread Łukasz Langa
This happens after Benjamin's changes in 83937. Anybody else seeing this? Intel i5 2.4 GHz, Mac OS X 10.8.3, clang $ hg up default $ make distclean $ MACOSX_DEPLOYMENT_TARGET=10.8 ./configure --with-pydebug $ make $ ./python.exe -Wd -m test.regrtest test_exceptions [1/1] test_exceptions Fatal Pyt

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-30 Thread Nick Coghlan
On 30 May 2013 06:25, "Brett Cannon" wrote: > > On Wed, May 29, 2013 at 2:56 PM, R. David Murray wrote: > > On Wed, 29 May 2013 20:10:44 +0200, Antoine Pitrou wrote: > >> On Wed, 29 May 2013 12:55:01 -0400 > >> Brett Cannon wrote: > >> > > Perhaps 'managed_module'? > >> > > >> > managed_module

Re: [Python-Dev] Bilingual scripts

2013-05-30 Thread Nick Coghlan
On 30 May 2013 04:40, "Barry Warsaw" wrote: > > On May 29, 2013, at 01:01 PM, Nick Coghlan wrote: > > >PEP 432 is also related, as it includes the "pysystem" proposal [1] > >(an alternate Python CLI that will default to -Es behaviour, but is > >otherwise similar to the standard "python" interprete

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-30 Thread Alfredo Solano
Hi, What about ModuleProxy? From the dictionary: prox·y /ˈpräksē/ Noun The authority to represent someone else, esp. in voting. A person authorized to act on behalf of another. Synonyms deputy - representative - agent - substitute Alfredo On 05/30/2013 10:34 AM, Mark Shannon wrote: On 29/0

Re: [Python-Dev] cpython: Introduce importlib.util.ModuleManager which is a context manager to

2013-05-30 Thread Mark Shannon
On 29/05/13 01:14, Brett Cannon wrote: On Tue, May 28, 2013 at 5:40 PM, Antoine Pitrou wrote: On Tue, 28 May 2013 23:29:46 +0200 (CEST) brett.cannon wrote: +.. class:: ModuleManager(name) + +A :term:`context manager` which provides the module to load. The module will +either come