Mauricio Villegas added the comment:
FYI there is a new python package that extends argparse with the enhancements
proposed here and more.
https://pypi.org/project/jsonargparse/
--
nosy: +mauvilsa
___
Python tracker
<https://bugs.python.
Mauricio Villegas added the comment:
I think this is affecting me or it is a new similar issue. And it is not only
for python 3.9, but also from 3.6 up. I am working on making code configurable
based on signatures (see
https://jsonargparse.readthedocs.io/en/stable/#classes-methods
Mauricio Villegas added the comment:
> Doesn’t it do that with any built in function?
Sorry. I did not include what is the behavior for other classes. An example
could be calendar.Calendar. In this case the signature gives:
>>> from calendar import Calendar
>>> imp
Change by Mauricio Villegas :
--
components: +Library (Lib)
type: -> behavior
___
Python tracker
<https://bugs.python.org/issue44618>
___
___
Python-bugs-lis
New submission from Mauricio Villegas :
Classes in the datetime module are implemented using __new__ with some named
parameters. I want to be able to inspect their signature to know which are the
names of the parameters it accepts like it works for most classes. However,
this does not work
Mauricio Villegas added the comment:
I created another issue since the problem appears to be a bit different:
https://bugs.python.org/issue44618
--
___
Python tracker
<https://bugs.python.org/issue40
Mauricio Villegas added the comment:
I am not sure if this affects all built-in classes, assuming that by built-in
it means that `SOMEOBJECT.__class__.__module__ == 'builtins'`. For example I
have C++ library that is compiled into a python module using swig. It is
available as a docker
Mauricio Villegas added the comment:
Also happens in python 3.10.
=== Python 3.10.0b4 ===
(*args, **kwargs)
(self, /, *args, **kwargs)
Traceback (most recent call last):
...
ValueError: no signature found for builtin type
--
versions: +Python 3.10