[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2022-03-18 Thread Tim Mitchell
Change by Tim Mitchell : Added file: https://bugs.python.org/file50689/test_sdm.py ___ Python tracker <https://bugs.python.org/issue36457> ___ ___ Python-bugs-list mailin

[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2022-03-18 Thread Tim Mitchell
Tim Mitchell added the comment: I've come up with a version that does not require a base class. Seems a bit hacky as the descriptor __get__ method now modifies the class to put the dispatch table in place the first time the method is accessed. -- Added file: https://bugs.python.org

[issue36744] functools.singledispatch: Shouldn't require a positional argument if there is only one keyword argument

2022-03-17 Thread Tim Mitchell
Tim Mitchell added the comment: I would really prefer the dispatch logic remains simple and fast, rather than handle single keyword arguments. -- nosy: +Tim Mitchell2 ___ Python tracker <https://bugs.python.org/issue36

[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2019-04-11 Thread Tim Mitchell
Tim Mitchell added the comment: Attached is an improved implementation that does not use a module level register() function. It makes the code in the original post work as expected: The `@BaseVisitor.visit.register()` decorator on the `AVisitor` class does not modify the base class

[issue36457] functools.singledispatchmethod interacts poorly with subclasses

2019-03-27 Thread Tim Mitchell
New submission from Tim Mitchell : The new functools.singledispatchmethod (issue32380) class interacts poorly with subclasses. There is no way for a sub-class to override or extend the dispatch registry. E.g. class BaseVistor: @singledispatchmethod def visit(self, obj): raise

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-20 Thread Tim Mitchell
Tim Mitchell added the comment: Changes as per Martins review. -- Added file: http://bugs.python.org/file45159/subprocess3.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/i

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-18 Thread Tim Mitchell
Tim Mitchell added the comment: Am now working from tip of default in mercurial (Python 3.6). * Removed all changes to subprocess.rst. subprocess.__doc__ * Trimmed down even further - removed function signatures. * added note to see Python docs for complete description. Exception docs * just

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-18 Thread Tim Mitchell
Tim Mitchell added the comment: hg patch with changes forthcoming -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue26240> ___ ___

[issue26240] Docstring of the subprocess module should be cleaned up

2016-10-17 Thread Tim Mitchell
Tim Mitchell added the comment: Have stripped down the module __doc__ to a list of contents. I chose to indent the descriptions of each argument to Popen. I know this is non-standard but it is such a long ramble otherwise. Changed true -> :const:`True` in subprocess.rst. -- keywo

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Tim Mitchell
Tim Mitchell added the comment: Added test to patch -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27946> ___ ___ Python-bugs-

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Tim Mitchell
Changes by Tim Mitchell <tim.mitchell.c...@gmail.com>: Removed file: http://bugs.python.org/file44605/0001-issue27946-Hold-reference-to-dict-in-PyDict_GetItem.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Tim Mitchell
Changes by Tim Mitchell <tim.mitchell.c...@gmail.com>: Added file: http://bugs.python.org/file44611/0001-issue27946-Hold-reference-to-dict-in-PyDict_GetItem.patch ___ Python tracker <rep...@bugs.python.org> <http://bugs.python

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Tim Mitchell
Tim Mitchell added the comment: see also similar dict issue 27945 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27946> ___ ___

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Tim Mitchell
Tim Mitchell added the comment: see also similar dict issue 27945 -- ___ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue27946> ___ ___

[issue27946] issues in elementtree and elsewhere due to PyDict_GetItem

2016-09-12 Thread Tim Mitchell
Tim Mitchell added the comment: Verified problem. Added patch to keep reference to dict in PyDict_GetItem. -- keywords: +patch nosy: +Tim Mitchell Added file: http://bugs.python.org/file44605/0001-issue27946-Hold-reference-to-dict-in-PyDict_GetItem.patch

[issue27945] Various segfaults with dict

2016-09-11 Thread Tim Mitchell
Tim Mitchell added the comment: Here is my patch for parts 3 and 4. Core issue for part 4 appears to be dk_lookup calling arbitrary python code may free the key. dk_lookup is also used in _PyDict_LoadGlobal not sure if this bug can occur here. -- nosy: +Tim Mitchell Added file: http

Re: python scalability

2008-07-10 Thread Tim Mitchell
Thanks for all the replies - they have all been helpful. On reflection I think our problems are probably design and people related. Cheers, Tim Michele Simionato wrote: On Jul 10, 6:32 am, Tim Mitchell [EMAIL PROTECTED] wrote: Hi All, I work on a desktop application that has been

python scalability

2008-07-09 Thread Tim Mitchell
Hi All, I work on a desktop application that has been developed using python and GTK (see www.leapfrog3d.com). We have around 150k lines of python code (and 200k+ lines of C). We also have a new project manager with a C# background who has deep concerns about the scalability of python as

how do I know if I'm using a debug build of python

2008-04-17 Thread Tim Mitchell
Hi, A quick question: Is there any way for a python script to know if it's being executed by a debug build of python (python_d.exe) instead of python? Thanks Tim -- http://mail.python.org/mailman/listinfo/python-list