David Caro added the comment:
> David, which issue number is this?
It's issue41295, pr #21473
--
___
Python tracker
<https://bugs.python.org
David Caro added the comment:
Just sent a PR that fixes the issue (a first approach), let me know if it's
addressing the issue correctly or if there's a better way.
Thanks!
--
___
Python tracker
<https://bugs.python.o
Change by David Caro :
--
keywords: +patch
nosy: +David Caro
nosy_count: 5.0 -> 6.0
pull_requests: +20617
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21473
___
Python tracker
<https://bugs.python.org/i
Change by David Caro :
--
nosy: +David Caro
nosy_count: 5.0 -> 6.0
pull_requests: +20618
pull_request: https://github.com/python/cpython/pull/21473
___
Python tracker
<https://bugs.python.org/issu
David Caro added the comment:
Elaborating on the last message, given the following code:
```
1 #!/usr/bin/env python3
2
3 from functools import wraps
4
5
6 def return_string(wrapped):
7 @wraps(wrapped)
8 def wrapper(an_int: int) -> str:
9 return str(wrap
David Caro added the comment:
As a note, mypy does not tpyecheck the wrapper functions, probably because it
would not be possible with the current code (as the typing hints get lost):
https://mypy.readthedocs.io/en/latest/generics.html?highlight=wrapper#declaring-decorators
Change by David Caro :
--
keywords: +patch
pull_requests: +20538
stage: -> patch review
pull_request: https://github.com/python/cpython/pull/21392
___
Python tracker
<https://bugs.python.org/issu
Change by David Caro :
--
nosy: +David Caro
nosy_count: 4.0 -> 5.0
pull_requests: +20539
pull_request: https://github.com/python/cpython/pull/21392
___
Python tracker
<https://bugs.python.org/iss
David Caro added the comment:
Hi Terry,
That would not work in this case, as I'd want to override all annotations with
the wrapper function ones if there's any, instead of merging them.
The specific use case, is a type checker (part of TestSlide testing framework),
to veri
New submission from David Caro :
In version 3.2, bpo-8814 introduced copying the __annotations__ property from
the wrapped function to the wrapper by default.
That would be the desired behavior when your wrapper function has the same
signature than the function it wraps, but in some cases
David Caro added the comment:
Of course, the RFC that discusses the MIME-Version Header is RFC-2045
http://www.ietf.org/rfc/rfc2045.txt
Extract of the page 8:
"Note that the MIME-Version header field is required at the top level
of a message. It is not required for each body part
New submission from David Caro :
When attaching a subpart to a multipart message, python should follow the
recomendations of the rfcs and remove the MIME-Version header of each part,
leaving only one MIME-Version header at the beggining of the message.
>>> from email.mime.multipa
David Caro added the comment:
Yes it is, here
http://docs.python.org/dev/library/argparse.html#argument-abbreviations.
--
___
Python tracker
<http://bugs.python.org/issue10
David Caro added the comment:
It is not an issue, it will try to match all the optional parameters, and if
only one matches, then it will use it:
2110 elif option_string.startswith(option_prefix):
2111 action = self._option_string_actions[option_string
Changes by David Caro :
--
title: options starting with -- match substrings -> argparse: options starting
with -- match substrings
___
Python tracker
<http://bugs.python.org/issu
Changes by David Caro :
--
components: +Extension Modules
versions: +Python 2.6
___
Python tracker
<http://bugs.python.org/issue10981>
___
___
Python-bugs-list m
New submission from David Caro :
When parsing option like --optionname, --option will match it too
example:
>>> import argparse
>>> parser = argparse.ArgumentParser()
>>> parser = argparse.ArgumentParser()
>>> parser.add_argument('--superstring'
17 matches
Mail list logo