Manuel Krebber added the comment:
@Serhiy That would require me to compile Python myself though, right? Is there
a reason why the limit is only for try/for and not for if?
@Antoine Well, the goal is to be able to generate Python 2 compatible code . I
will try to split the code into more
Manuel Krebber added the comment:
I have already tried to reduce the nesting, but it still crashes. I have to
admit that ~20 levels of nesting are still quite a lot. But I am surprised that
so few levels of nesting already are a problem for the parser... I have
attached the generated code
Manuel Krebber added the comment:
1) Yes.
2) A .pyc file was not generated.
3) It is always the same location where the error occurs.
4) It did not crash on the linux machine that I tested it on.
I have tried to split the code up into multiple files, but it still crashes. I
have uploaded
New submission from Manuel Krebber:
With a pattern matching library I am generating some Python code that matches
patterns. For a very big pattern set I generate a Python file which is about
20MB and has ~300K LOC. When I try to execute the file with Python 3.6.2 on
Windows 10 (64bit
New submission from Manuel Krebber:
Some of the builtin methods are not recognized as such by inspect.isroutine().
inspect.ismethoddescriptor() only returns True for the unbound versions of the
methods but not the bound ones.
For example:
>>> inspect.isroutine(object.__st
Manuel Krebber added the comment:
One question I was wondering about is whether those types should be checked by
inspect.isroutine() as well.
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Manuel Krebber added the comment:
Okay, I added MethodDescriptorType to the types module and updated the docs.
Hope this is okay now.
--
Added file: http://bugs.python.org/file46455/slot-wrapper-types.patch
___
Python tracker <rep...@bugs.python.
Manuel Krebber added the comment:
Sorry, I accidentally replied to the worng issue -.-
--
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Manuel Krebber added the comment:
I created the last patch without commiting, so maybe this one will work
properly with the revision tool.
--
Added file: http://bugs.python.org/file46429/slot-wrapper-types.patch
___
Python tracker <
Changes by Manuel Krebber <ad...@wheerd.de>:
Removed file: http://bugs.python.org/file46428/slot-wrapper-types.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python
Manuel Krebber added the comment:
I create the last diff without creating a commit, so maybe this one works
better.
--
nosy: +Wheerd
Added file: http://bugs.python.org/file46428/slot-wrapper-types.patch
___
Python tracker <rep...@bugs.python.
Manuel Krebber added the comment:
Alright, I added some tests and tried it again with the patch.
--
Added file: http://bugs.python.org/file46427/slot-wrapper-types.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
Manuel Krebber added the comment:
I added some docs, but I am not sure what I would want to test here. There are
no tests for types.BuiltinMethodType either. Maybe the string representation of
it could be tested, but an isinstance test seems pretty redundant. I hope this
patch file works
Manuel Krebber added the comment:
I would suggest the names SlotWrapperType and MethodWrapperType because I think
they match their string representations the closest.
For checking whether something is a method/function one could also use
inspect.isroutine (or inspect.ismethoddescriptor
Changes by Manuel Krebber <ad...@wheerd.de>:
--
keywords: +patch
Added file:
http://bugs.python.org/file46420/0001-Added-SlotWrapperType-and-MethodWrapperType-to-the-t.patch
___
Python tracker <rep...@bugs.python.org>
<http://
New submission from Manuel Krebber:
There currently is no type in the types module for the slot
wrappers/wrapper_descriptor types.
I would like to have something like
WrapperDescriptor = type(object.__init__)
added to it (or maybe even add it to MethodType). This would be helpful
Manuel Krebber added the comment:
I updated the patch to add reflect the covariance.
--
Added file: http://bugs.python.org/file45606/frozenset-doc.patch
___
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/i
New submission from Manuel Krebber:
The typing.FrozenSet is missing in the typing module documentation. I have
attached a patch that adds it similar to the typing.Set which is already in the
documentation.
--
components: Library (Lib)
files: frozenset-doc.patch
keywords: patch
Manuel Krebber added the comment:
Oh, I should have searched properly before creating this ticket. Sorry about
that. I guess I will be subclassing Counter in my project then, to get this
functionality... Only problem is, that when using the builtin __add__ etc. of
my Counter subclass, I
New submission from Manuel Krebber:
I would really like there to be comparison operators for collection.Counter
similar to the ones for sets. While you can now use minus to some degree for
that comparison, it is very inefficient. I have attached an implementation of
__ge__ and __le__
20 matches
Mail list logo