Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(14497)

#23500: Argument Clinic: multiple macro definition

Can't Edit
Can't Publish+Mail
Start Review
Created:
4 years, 6 months ago by storchaka+cpython
Modified:
4 years, 5 months ago
Reviewers:
larry
CC:
larry, devnull_psf.upfronthosting.co.za, storchaka
Visibility:
Public.

Patch Set 1 #

Patch Set 2 #

Patch Set 3 #

Patch Set 4 #

Patch Set 5 #

Total comments: 8

Patch Set 6 #

Total comments: 5

Patch Set 7 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Modules/clinic/spwdmodule.c.h View 1 2 3 4 5 6 2 chunks +5 lines, -5 lines 0 comments Download
Modules/clinic/zlibmodule.c.h View 1 2 3 4 5 6 3 chunks +5 lines, -9 lines 0 comments Download
Modules/posixmodule.c View 1 2 3 4 5 6 4 chunks +1 line, -13 lines 0 comments Download
Tools/clinic/clinic.py View 1 2 3 4 5 6 13 chunks +99 lines, -69 lines 3 comments Download

Messages

Total messages: 9
storchaka_gmail.com
http://bugs.python.org/review/23500/diff/14230/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14230/Tools/clinic/clinic.py#newcode71 Tools/clinic/clinic.py:71: def _text_accumulator(): You can implement it as class constructor. ...
4 years, 6 months ago #1
storchaka_gmail.com
http://bugs.python.org/review/23500/diff/14440/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14440/Tools/clinic/clinic.py#newcode1452 Tools/clinic/clinic.py:1452: valid_types = ('buffer', 'file', 'suppress') # , 'two-pass') It ...
4 years, 5 months ago #2
larry
http://bugs.python.org/review/23500/diff/14230/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14230/Tools/clinic/clinic.py#newcode71 Tools/clinic/clinic.py:71: def _text_accumulator(): I don't think your version is an ...
4 years, 5 months ago #3
larry
http://bugs.python.org/review/23500/diff/14440/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14440/Tools/clinic/clinic.py#newcode1452 Tools/clinic/clinic.py:1452: valid_types = ('buffer', 'file', 'suppress') # , 'two-pass') On ...
4 years, 5 months ago #4
storchaka_gmail.com
http://bugs.python.org/review/23500/diff/14230/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14230/Tools/clinic/clinic.py#newcode1440 Tools/clinic/clinic.py:1440: self._array = [] On 2015/04/03 18:53:28, larry wrote: > ...
4 years, 5 months ago #5
storchaka_gmail.com
http://bugs.python.org/review/23500/diff/14440/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14440/Tools/clinic/clinic.py#newcode1608 Tools/clinic/clinic.py:1608: d = self.get_destination_buffer On 2015/04/03 19:08:33, larry wrote: > ...
4 years, 5 months ago #6
storchaka_gmail.com
http://bugs.python.org/review/23500/diff/14441/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14441/Tools/clinic/clinic.py#newcode827 Tools/clinic/clinic.py:827: if methoddef_define and f.name not in clinic.ifndef_symbols: What is ...
4 years, 5 months ago #7
larry
http://bugs.python.org/review/23500/diff/14441/Tools/clinic/clinic.py File Tools/clinic/clinic.py (right): http://bugs.python.org/review/23500/diff/14441/Tools/clinic/clinic.py#newcode827 Tools/clinic/clinic.py:827: if methoddef_define and f.name not in clinic.ifndef_symbols: On 2015/04/03 ...
4 years, 5 months ago #8
storchaka_gmail.com
4 years, 5 months ago #9
http://bugs.python.org/review/23500/diff/14441/Tools/clinic/clinic.py
File Tools/clinic/clinic.py (right):

http://bugs.python.org/review/23500/diff/14441/Tools/clinic/clinic.py#newcode827
Tools/clinic/clinic.py:827: if methoddef_define and f.name not in
clinic.ifndef_symbols:
On 2015/04/03 19:32:22, larry wrote:
> On 2015/04/03 19:27:09, storchaka wrote:
> > What is clinic?
> 
> A global variable defined on line 1524.  A reference to the single object of
> class Clinic.  It's not passed in to warn_or_fail() because not all functions
> that throw warnings or errors have references to the Clinic object.  Storing
it
> in a global is a "practicality beats purity" tradeoff.

Oh, there is global "clinic", there is instance attribute "clinic", there are
"clinic" parameters in some methods, and there is local "clinic". This looks as
ugly design and I hope you will find a time for refactoring.

But this shouldn't stop committing this patch.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+