Re: Match.groupdict: Meaning of default argument?

2022-05-03 Thread Loris Bennett
Julio Di Egidio writes: > On Friday, 29 April 2022 at 09:50:08 UTC+2, Loris Bennett wrote: >> Hi, >> >> If I do >> >> import re >> pattern = >> re.compile(r'(?P\d*)(-?)(?P\d\d):(?P\d\d):(?P\d\d)') >> s = '104-02:47:06' >> match = pattern.search(s) >> match_dict = match.groupdict('0') >>

Re: Match.groupdict: Meaning of default argument?

2022-05-03 Thread Loris Bennett
"Loris Bennett" writes: > r...@zedat.fu-berlin.de (Stefan Ram) writes: > >> "Loris Bennett" writes: >>>I thought that 'days' would default to '0'. >> >> It will get the value '0' if (?P\d*) does >> /not/ participate in the match. >> >> In your case, it /does/ participate in the match, >>

Re: Match.groupdict: Meaning of default argument?

2022-05-03 Thread Loris Bennett
r...@zedat.fu-berlin.de (Stefan Ram) writes: > "Loris Bennett" writes: >>I thought that 'days' would default to '0'. > > It will get the value '0' if (?P\d*) does > /not/ participate in the match. > > In your case, it /does/ participate in the match, > \d* matching the empty string. > >

Match.groupdict: Meaning of default argument?

2022-04-29 Thread Loris Bennett
Hi, If I do import re pattern = re.compile(r'(?P\d*)(-?)(?P\d\d):(?P\d\d):(?P\d\d)') s = '104-02:47:06' match = pattern.search(s) match_dict = match.groupdict('0') I get match_dict {'days': '104', 'hours': '02', 'minutes': '47', 'seconds': '06'} However, if the string has no

[issue448911] Empty list as default argument problem

2022-04-10 Thread admin
Change by admin : -- github: None -> 34914 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue416951] Problem with dictionary default argument

2022-04-10 Thread admin
Change by admin : -- github: None -> 34361 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47054] "SyntaxError: non-default argument follows default argument" confuses

2022-03-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- assignee: -> gregory.p.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue47054] "SyntaxError: non-default argument follows default argument" confuses

2022-03-20 Thread Gregory P. Smith
Change by Gregory P. Smith : -- keywords: +patch nosy: +gregory.p.smith nosy_count: 4.0 -> 5.0 pull_requests: +30102 stage: needs patch -> patch review pull_request: https://github.com/python/cpython/pull/32014 ___ Python tracker

[issue47054] "SyntaxError: non-default argument follows default argument" confuses

2022-03-18 Thread Terry J. Reedy
Change by Terry J. Reedy : -- title: "SyntaxError: non-default argument follows default argument" should be "parameter" -> "SyntaxError: non-default argument follows default argument" confuses ___ Python

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-18 Thread Terry J. Reedy
Terry J. Reedy added the comment: Current message same in 3.11 and 3.9, but I am not sure about backporting to old parser. However merges a change, if any, can decide. -- nosy: +pablogsal, terry.reedy stage: -> needs patch type: -> behavior versions: +Python 3.11 -Python 3.7,

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-18 Thread Bluenix
Bluenix added the comment: Yes I agree, that would be the best. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-17 Thread Vedran Čačić
Vedran Čačić added the comment: The problem is more subtle. The thing is, "default parameter" doesn't make sense in this context. Yes, a and b are parameter, but a is not "default parameter" in any sensible way. It is _None_ which is the default argument for parameter

[issue47054] "SyntaxError: non-default argument follows default argument" should be "parameter"

2022-03-17 Thread Bluenix
New submission from Bluenix : Running the code below will produce a SyntaxError with the message: "non-default argument follows default argument". def test(a=None, b): return b if a is None else a The issue is that `a` and `b` aren't *arguments*, rather, they are *

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-22 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 83aef4d34022f293336f606dba8598cc7ac8f9f2 by Miss Islington (bot) in branch '3.10': bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) (#30765)

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-21 Thread miss-islington
miss-islington added the comment: New changeset 9e3ff821dac05e8fde030ec83bd988f3eba66065 by Miss Islington (bot) in branch '3.9': bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285)

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-21 Thread miss-islington
Change by miss-islington : -- pull_requests: +28952 pull_request: https://github.com/python/cpython/pull/30766 ___ Python tracker ___

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-21 Thread miss-islington
Change by miss-islington : -- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +28951 pull_request: https://github.com/python/cpython/pull/30765 ___ Python tracker

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-21 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 881a763cfe07ef4a5806ec78f13a9bc99e8909dc by Weipeng Hong in branch 'main': bpo-43118: Fix bug in inspect.signature around 'base.__text_signature__' (GH-30285) https://github.com/python/cpython/commit/881a763cfe07ef4a5806ec78f13a9bc99e8909dc

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2022-01-18 Thread Irit Katriel
Change by Irit Katriel : -- type: -> behavior versions: +Python 3.11 -Python 3.6, Python 3.7, Python 3.8 ___ Python tracker ___

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2021-12-28 Thread hongweipeng
Change by hongweipeng : -- nosy: +hongweipeng nosy_count: 1.0 -> 2.0 pull_requests: +28499 stage: -> patch review pull_request: https://github.com/python/cpython/pull/30285 ___ Python tracker

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- Removed message: https://bugs.python.org/msg405700 ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2021-11-04 Thread Eryk Sun
Change by Eryk Sun : -- components: +Library (Lib) -Subinterpreters nosy: -ahmedsayeed1982 versions: +Python 3.7 -Python 3.8 ___ Python tracker ___

[issue28524] Set default argument of logging.disable() to logging.CRITICAL

2021-11-04 Thread Ahmed Sayeed
Ahmed Sayeed added the comment: $ ../gdb -nx --data-directory=../data-directory (gdb) set osabi GNU/Linux http://www.compilatori.com/category/technology/ (gdb) set sysroot /home/simark/build/binutils-gdb/gdb/repo (gdb) file Foo

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-06-22 Thread Guido van Rossum
Guido van Rossum added the comment: New changeset 6af4e6b266cb19d646ad7e4051fc7974c3096d23 by Erik Welch in branch 'main': bpo-43918: document signature and default argument of `anext` builtin (#25551) https://github.com/python/cpython/commit/6af4e6b266cb19d646ad7e4051fc7974c3096d23

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-24 Thread Erik Welch
Erik Welch added the comment: Thanks for taking a look Terry. I saw that error as well. It is separate from this issue, and I don't think it is a bug. No other builtin functions or methods that raise this error with this text have such a notice in their docstring, so it doesn't seem

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-24 Thread Terry J. Reedy
Terry J. Reedy added the comment: inspect.signature(anext) raises "ValueError: builtin has invalid signature". Guido, is this a bug? Even if not, docstring should have it. -- nosy: +terry.reedy ___ Python tracker

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-22 Thread Erik Welch
Change by Erik Welch : -- keywords: +patch pull_requests: +24271 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25551 ___ Python tracker ___

[issue43918] anext builtin docstring has no signature text or info about default argument

2021-04-22 Thread Erik Welch
signature as is typical for builtins. This means `help(anext)` in the Python REPL gives no indication how to call the function. It should. This is clearly an oversight. See comment here: https://github.com/python/cpython/pull/23847#commitcomment-45318696 Also, the "default"

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks for the fix! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 013c30e5fcee449cee63354d34585d6111782c82 by Miss Islington (bot) in branch '3.9': bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867) (GH-25200)

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset bdee2a389e4b10e1c0ab65bbd4fd03defe7b2837 by Miss Islington (bot) in branch '3.8': bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867) (GH-25201)

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +23940 pull_request: https://github.com/python/cpython/pull/25201 ___ Python tracker ___

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread miss-islington
miss-islington added the comment: New changeset 75220674c07abfc90c2cd7862d04cfa2e2354450 by Zackery Spytz in branch 'master': bpo-36470: Allow dataclasses.replace() to handle InitVars with default values (GH-20867)

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-04-05 Thread miss-islington
Change by miss-islington : -- pull_requests: +23939 pull_request: https://github.com/python/cpython/pull/25200 ___ Python tracker ___

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2021-02-03 Thread Komiya Takeshi
Komiya Takeshi added the comment: FWIW, I succeeded to inspect the class with importing the constant from the base module as a workaround: ``` import inspect import io from io import DEFAULT_BUFFER_SIZE class MyBufferedReader(io.BufferedReader): """buffer reader class."""

[issue43118] inspect.signature() raises RuntimeError on failed to resolve the default argument value

2021-02-03 Thread Komiya Takeshi
New submission from Komiya Takeshi : inspect.signature() raises RuntimeError on failed to resolve the default argument value. For example, it fails to inspect a subclass of io.BufferedReader: Example: ``` import inspect import io class MyBufferedReader(io.BufferedReader): "&qu

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2021-01-29 Thread Cosimo Lupo
Cosimo Lupo added the comment: any updates on this? Would be great if any of the two candidate PRs was merged. It's basically impossible to use replace() with default InitVars.. Thank you in advace -- nosy: +anthrotype ___ Python tracker

[issue43043] Python tutorial could make rules for default argument definition clearer

2021-01-27 Thread Jesse Silverman
of the material which is presented. Regarding 4.7.1. Default Argument Values of the excellent Python tutorial: I guessed that I would see the behavior shown below from my understanding of default arguments in several other languages. I did not read anything in this tutorial section that would lead me

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2020-06-13 Thread Zackery Spytz
Change by Zackery Spytz : -- nosy: +ZackerySpytz nosy_count: 4.0 -> 5.0 pull_requests: +20056 pull_request: https://github.com/python/cpython/pull/20867 ___ Python tracker ___

[issue39300] dataclasses non-default argument follows default argument

2020-01-11 Thread Eric V. Smith
Eric V. Smith added the comment: > Ah, I see, so if I understand correctly the init method for the example given > would become __init__(self, PARAM: int = 1, ARG: int) since the fields are > kept in an ordered mapping Correct. -- assignee: -> eric.smith resolution: -> not a bug

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread lijok
lijok added the comment: > I think this is a combination of the above statement at end of [0] and > inheritance following the order of the fields at [1] Ah, I see, so if I understand correctly the init method for the example given would become __init__(self, PARAM: int = 1, ARG: int) since

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: See also issue36077 -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: > TypeError will be raised if a field without a default value follows a field > with a default value. This is true either when this occurs in a single class, > or as a result of class inheritance. I think this is a combination of the above

[issue39300] dataclasses non-default argument follows default argument

2020-01-10 Thread lijok
\Local\Programs\Python\Python38\lib\dataclasses.py", line 927, in _process_class _init_fn(flds, File "C:\Users\user\AppData\Local\Programs\Python\Python38\lib\dataclasses.py", line 503, in _init_fn raise TypeError(f'non-default argument {f.name!r} ' TypeError: n

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-12-02 Thread PCManticore
Change by PCManticore : -- keywords: +patch pull_requests: +16922 stage: -> patch review pull_request: https://github.com/python/cpython/pull/17441 ___ Python tracker ___

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-10-01 Thread Eric V. Smith
Change by Eric V. Smith : -- assignee: -> eric.smith ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-25 Thread Antoine Pitrou
Change by Antoine Pitrou : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-25 Thread miss-islington
miss-islington added the comment: New changeset 25cb4fd4fb0f44d2b6bf38379634f3d22b77aa17 by Miss Islington (bot) in branch '3.8': bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-25 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 898318b53d921298d1f1fcfa0f415844afbeb318 by Antoine Pitrou (Markus Mohrhard) in branch 'master': bpo-37502: handle default parameter for buffers argument of pickle.loads correctly (GH-14593)

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-25 Thread miss-islington
Change by miss-islington : -- pull_requests: +14718 pull_request: https://github.com/python/cpython/pull/14948 ___ Python tracker ___

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-07-18 Thread Michael Blahay
Michael Blahay added the comment: Ryan, I like option A as well, but it is a breaking change. Unlike in a compiled language where we could output a warning, making the proposed change could bring some software to a grinding halt. For now I'm going to make the documentation change and this

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-07 Thread Kyle Stanley
Kyle Stanley added the comment: Thanks for reporting the issue. On PR-14593 I reviewed the changes with interpreter screenshots showing the output of "pickle.loads(pickle.dumps(1, protocol=pickle.HIGHEST_PROTOCOL), buffers=None)" in the latest version of cpython master compared to the

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-04 Thread Markus Mohrhard
Markus Mohrhard added the comment: Sorr, I somehow managed to overwrite my title before submitting with the one from one if the results of my searches. -- ___ Python tracker

[issue37502] Fix default argument handling for buffers argument in pickle.loads

2019-07-04 Thread Markus Mohrhard
Change by Markus Mohrhard : -- title: Pure Python pickle module should not depend on _pickle.PickleBuffer -> Fix default argument handling for buffers argument in pickle.loads ___ Python tracker <https://bugs.python.org/issu

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-06-17 Thread Michael Blahay
Michael Blahay added the comment: Need some help searching github to determine the blast radius of the proposed changes. How does one look for instances of argparse.REMAINDER that are used with a default value? -- ___ Python tracker

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-27 Thread Ryan Govostes
Ryan Govostes added the comment: Thanks Michael for all of the examples. After reading them all, I concur that "it can be hard to conceptualize what the exact behavior should be." A documentation change is warranted, at the least. However the argparse documentation, while great, is dense

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-26 Thread Michael Blahay
Michael Blahay added the comment: Ryan, last chance, do you have any feedback? -- ___ Python tracker ___ ___ Python-bugs-list

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-13 Thread Michael Blahay
Michael Blahay added the comment: Ryan, What say you? Will you be satisfied with the addition of a note in the documentation? -- ___ Python tracker ___

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-11 Thread paul j3
paul j3 added the comment: Let me back off on that last suggestion. The problems described here and in https://bugs.python.org/issue17050 only apply to a positional. We could just add a note to the documentation to the effect. This nargs is best used as an optional as illustrated,

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-10 Thread paul j3
paul j3 added the comment: At the start of parse_known_args, all defaults (except SUPPRESS ones) are placed in the namespace: # add any action defaults that aren't present for action in self._actions: if action.dest is not SUPPRESS: if not

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-10 Thread Michael Blahay
Michael Blahay added the comment: Much detail has been provided regarding why the default is ignored when user the REMAINDER option. The desire to add an exception has not. Is there anyone that can provide guidance on whether the combination of: 1. Positional Argument 2. nargs=REMAINDER 3.

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-10 Thread Michael Blahay
Michael Blahay added the comment: With the optional arguments, the determination about whether to use the default value is made based on whether the flag is present or not. When positional arguments are involved, the need for the defaults seems to in part be determined based on whether the

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-10 Thread Michael Blahay
Michael Blahay added the comment: Here is another take on the issue, this time illustrated through the lens of optional arguments. import argparse parser = argparse.ArgumentParser() parser.add_argument('--foo', nargs=1,default=['none']) parser.add_argument('--baz', nargs='*',

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-10 Thread Michael Blahay
Michael Blahay added the comment: For the purpose of facilitating continuing conversation, here are two tests that contrast the use of * versus REMAINDER import argparse parser = argparse.ArgumentParser() parser.add_argument('foo', nargs=1,default=['none']) parser.add_argument('bar',

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-08 Thread Michael Blahay
Michael Blahay added the comment: Ryan, I have reviewed the documentation at https://docs.python.org/3/library/argparse.html#nargs and must admit that there is not a definitive answer that I can see regarding the defined behavior should there be no command line arguments that are in fact

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-08 Thread Michael Blahay
Michael Blahay added the comment: Okay, so the expected output after running parse.parse_args([]) is Namespace(['nothing']) -- ___ Python tracker ___

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-07 Thread Ryan Govostes
Ryan Govostes added the comment: Just don’t run the last line which is just an echoing of the output of parser.parse_args() repeated. The Namespace type would need to be imported if you really wanted to but there’s no point. On Tuesday, May 7, 2019, Michael Blahay wrote: > > Michael Blahay

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2019-05-07 Thread Michael Blahay
Michael Blahay added the comment: Ryan, what are the exact steps to reproduce the problem? This is what I get when I run the code you included: >>> import argparse >>> parser = argparse.ArgumentParser() >>> parser.add_argument('things', nargs=argparse.REMAINDER, default=['nothing'])

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-04-09 Thread Krzysztof Mierzejewski
Change by Krzysztof Mierzejewski : -- nosy: +mierzej ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-03-29 Thread Ivan Levkivskyi
Change by Ivan Levkivskyi : -- nosy: +levkivskyi ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue36470] dataclasses.replace raises an exception if InitVar with default argument is not provided.

2019-03-29 Thread Greg Kuhn
Greg Kuhn added the comment: Fixed title -- title: dataclasses replace raises an exception with an empty -> dataclasses.replace raises an exception if InitVar with default argument is not provided. ___ Python tracker <https://bugs.pyth

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2019-01-31 Thread INADA Naoki
INADA Naoki added the comment: I'm sorry. bpo-35865 (GH-11711) -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2019-01-31 Thread INADA Naoki
INADA Naoki added the comment: I revert this change in GH-35865. -- ___ Python tracker ___ ___ Python-bugs-list mailing list

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2019-01-31 Thread INADA Naoki
INADA Naoki added the comment: This should be reverted in 3.7. bpo-33504 changed dict_type from 3.8+, not 3.7. -- nosy: +inada.naoki ___ Python tracker ___

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2018-12-26 Thread paul j3
paul j3 added the comment: argparse.REMAINDER matches an empty list of arguments, just like '?' and '*'. So they are always 'filled', even by `parse_args([])`. '?' and '*' have some special handling of defaults in this case, see in argparse.ArgumentParser._get_values the two

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2018-12-14 Thread Terry J. Reedy
Change by Terry J. Reedy : -- nosy: +bethard stage: -> test needed versions: +Python 3.8 -Python 3.4, Python 3.5 ___ Python tracker ___

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2018-12-14 Thread Ryan Govostes
Change by Ryan Govostes : -- versions: +Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 ___ Python tracker ___ ___

[issue35495] argparse does not honor default argument for nargs=argparse.REMAINDER argument

2018-12-14 Thread Ryan Govostes
al status: open title: argparse does not honor default argument for nargs=argparse.REMAINDER argument type: behavior ___ Python tracker <https://bugs.python.org/issue35495> ___

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread Ned Deily
Ned Deily added the comment: Thanks, Andrés! -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: +Python 3.7 ___ Python tracker ___

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread Ned Deily
Ned Deily added the comment: New changeset dc20d9d1026282a2879992f4cef517a270c8a467 by Ned Deily (Miss Islington (bot)) in branch '3.7': bpo-33800: Fix default argument for parameter dict_type of ConfigParser/RawConfigParser (GH-7494) (GH-7542) https://github.com/python/cpython/commit

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread miss-islington
Change by miss-islington : -- pull_requests: +7177 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-08 Thread Ned Deily
Ned Deily added the comment: New changeset 3b0b90c8c3b8161f0ae9005b83b9b6449d4a8476 by Ned Deily (Andrés Delfino) in branch 'master': bpo-33800: Fix default argument for parameter dict_type of ConfigParser/RawConfigParser (GH-7494) https://github.com/python/cpython/commit

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-07 Thread Andrés Delfino
Change by Andrés Delfino : -- keywords: +patch pull_requests: +7119 stage: -> patch review ___ Python tracker ___ ___

[issue33800] Fix default argument for parameter dict_type of ConfigParser/RawConfigParser

2018-06-07 Thread Andrés Delfino
New submission from Andrés Delfino : Default argument of parameter dict_type of ConfigParser/RawConfigParser is shown as "collections.OrderedDict", while it recently migrated to "dict". PR fixes this, documents the change to dict, and fixes a versionchanged changed

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Change by Eric V. Smith : -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker ___

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 3d41f482594b6aab12a316202b3c06757262109a by Eric V. Smith (Miss Islington (bot)) in branch '3.7': bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152) (GH-6153)

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: New changeset 7389fd935c95b4b6f094312294e703ee0de18719 by Eric V. Smith in branch 'master': bpo-33100: Dataclasses now handles __slots__ and default values correctly. (GH-6152)

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread miss-islington
Change by miss-islington : -- pull_requests: +5911 ___ Python tracker ___

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Change by Eric V. Smith : -- keywords: +patch pull_requests: +5910 stage: -> patch review ___ Python tracker ___

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: Thanks, but I'm already looking at this in the context of a different bug. -- ___ Python tracker

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: There's also another major problem. Because Base.x has value, __init__ is not prepared correctly (member_descriptor is passed as default). @dataclass class Base: __slots__ = ('x',) x: Any Base() # No TypeError

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: My point is that the problem is that after: @dataclass class Base: __slots__ = ('x',) x: Any Base.x has a value (it's the member_descriptor for x). That's what's causing the problem that when adding a field to the derived class, it

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Adrian Stachlewski
Adrian Stachlewski added the comment: I don't really get your point. @dataclass class Base: __slots__ = ('x',) x: Any This case is described in PEP 557 as correct, so I don't understand why you want to generate error. Also inheritance without defining

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-19 Thread Eric V. Smith
Eric V. Smith added the comment: This is the same reason that this fails: class Base: __slots__ = ('x',) x = 3 with: ValueError: 'x' in __slots__ conflicts with class variable In the dataclasses case, the error needs to be improved, and moved to when the base

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-18 Thread Raymond Hettinger
Change by Raymond Hettinger : -- assignee: -> eric.smith nosy: +eric.smith ___ Python tracker ___

[issue33100] dataclasses and __slots__ - non-default argument (member_descriptor)

2018-03-18 Thread Adrian Stachlewski
g type of variable is possible. This code produce error: TypeError: non-default argument 'y' follows default argument 'x' variable in Derived class has changed default from MISSING to member_descriptor and that's the reason of the exception. -- components: Library (Lib) messages: 31407

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-10 Thread Berker Peksag
Berker Peksag added the comment: Thank you, Peter and Pablo. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed ___ Python tracker

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-10 Thread Berker Peksag
Berker Peksag added the comment: New changeset 7abbddd88d4debe75b201145b6212afb7d93c457 by Berker Peksag (Miss Islington (bot)) in branch '3.6': bpo-31824: Document default value of 'errors' parameters (GH-4328)

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-10 Thread Roundup Robot
Change by Roundup Robot : -- pull_requests: +4320 ___ Python tracker ___

[issue31824] Missing default argument detail in documentation of StreamReaderWriter

2017-11-10 Thread Berker Peksag
Berker Peksag added the comment: New changeset e184cfd7bf8bcfd160e3b611d4351ca3ce52d9e2 by Berker Peksag (Pablo Galindo) in branch 'master': bpo-31824: Document default value of 'errors' parameters (GH-4328)

  1   2   3   4   5   >