| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -3,6 +3,9 @@ Released on 2020-10-05? | |||
| 3 | 3 | ====================================== | |
| 4 | 4 | ||
| 5 | 5 | ||
| 6 | + bpo-40181: In calltips, stop reminding that '/' marks the end of | ||
| 7 | + positional-only arguments. | ||
| 8 | + | ||
| 6 | 9 | bpo-41468: Improve IDLE run crash error message (which users should | |
| 7 | 10 | never see). | |
| 8 | 11 | ||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -118,7 +118,6 @@ def get_entity(expression): | |||
| 118 | 118 | _first_param = re.compile(r'(?<=\()\w*\,?\s*') | |
| 119 | 119 | _default_callable_argspec = "See source or doc" | |
| 120 | 120 | _invalid_method = "invalid method signature" | |
| 121 | - _argument_positional = " # '/' marks preceding args as positional-only." | ||
| 122 | 121 | ||
| 123 | 122 | def get_argspec(ob): | |
| 124 | 123 | '''Return a string describing the signature of a callable object, or ''. | |
@@ -146,9 +145,6 @@ def get_argspec(ob): | |||
| 146 | 145 | else: | |
| 147 | 146 | argspec = '' | |
| 148 | 147 | ||
| 149 | - if '/' in argspec and len(argspec) < _MAX_COLS - len(_argument_positional): | ||
| 150 | - # Add explanation TODO remove after 3.7, before 3.9. | ||
| 151 | - argspec += _argument_positional | ||
| 152 | 148 | if isinstance(fob, type) and argspec == '()': | |
| 153 | 149 | # If fob has no argument, use default callable argspec. | |
| 154 | 150 | argspec = _default_callable_argspec | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -61,18 +61,16 @@ class SB: __call__ = None | |||
| 61 | 61 | ||
| 62 | 62 | if List.__doc__ is not None: | |
| 63 | 63 | tiptest(List, | |
| 64 | - f'(iterable=(), /){calltip._argument_positional}' | ||
| 64 | + f'(iterable=(), /)' | ||
| 65 | 65 | f'\n{List.__doc__}') | |
| 66 | 66 | tiptest(list.__new__, | |
| 67 | 67 | '(*args, **kwargs)\n' | |
| 68 | 68 | 'Create and return a new object. ' | |
| 69 | 69 | 'See help(type) for accurate signature.') | |
| 70 | 70 | tiptest(list.__init__, | |
| 71 | - '(self, /, *args, **kwargs)' | ||
| 72 | - + calltip._argument_positional + '\n' + | ||
| 71 | + '(self, /, *args, **kwargs)\n' | ||
| 73 | 72 | 'Initialize self. See help(type(self)) for accurate signature.') | |
| 74 | - append_doc = (calltip._argument_positional | ||
| 75 | - + "\nAppend object to the end of the list.") | ||
| 73 | + append_doc = "\nAppend object to the end of the list." | ||
| 76 | 74 | tiptest(list.append, '(self, object, /)' + append_doc) | |
| 77 | 75 | tiptest(List.append, '(self, object, /)' + append_doc) | |
| 78 | 76 | tiptest([].append, '(object, /)' + append_doc) | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,2 @@ | |||
| 1 | + In calltips, stop reminding that '/' marks the end of positional-only | ||
| 2 | + arguments. | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments