Zachary Ware added the comment:
This was added by #20456 (a couple weeks ago).
--
components: +Demos and Tools
resolution: - fixed
stage: - committed/rejected
status: open - closed
superseder: - Argument Clinic rollup patch, 2014/01/31
type: - enhancement
versions: +Python 3.4
Changes by Zachary Ware zachary.w...@gmail.com:
--
nosy: +taleinat
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Python-bugs-list
Tal Einat added the comment:
+1 for this. It would save a bit of manual conversion work, and would
significantly reduce the size and complexity of the resulting patches.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
Larry Hastings added the comment:
I have a couple big patches incoming, over the next couple of days. Here's a
sneak-peek of my todo list:
* buffer support just went in (#20287)
* all builtins support landing maybe tomorrow (#20260)
* suppress the self parameter on impl for METH_STATIC
*
Ryan Smith-Roberts added the comment:
I believe the feature you starred resolves this enhancement issue, in which
case my patches are obsolete. And yes, the 'as' syntax makes a lot more sense.
Here's how I hope it works (the arg parsing wrapper remains unchanged):
foo: int
...
_impl(...,
Larry Hastings added the comment:
On 01/18/2014 01:12 PM, Ryan Smith-Roberts wrote:
Ryan Smith-Roberts added the comment:
I believe the feature you starred resolves this enhancement issue, in which
case my patches are obsolete. And yes, the 'as' syntax makes a lot more
sense. Here's how I
Ryan Smith-Roberts added the comment:
Yes, that makes more sense. The specific syntax is nearly irrelevant compared
to the feature existing at all. You still haven't indicated whether your
starred feature matches the *result* that I outlined. Does it?
--
Changes by Serhiy Storchaka storch...@gmail.com:
--
nosy: -serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Ryan Smith-Roberts added the comment:
The use case is primarily to minimize code churn for the derby, but since
you're the one (heroically) doing the code review it's really your call. I
whipped up a quick patch for this feature, and even if you remove c_name from
__init__ I think it's still
Changes by Ryan Smith-Roberts r...@lab.net:
Added file:
http://bugs.python.org/file33494/argument_clinic_ensure_legal_cleanup.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
Zachary Ware added the comment:
The nested scope trick makes me happy. There are still a lot of cases in the
conversions I've worked on where a variable had to be renamed due to having
documented a different name for the parameter, but in the vast majority of
those cases the new name makes
Larry Hastings added the comment:
I don't see the big win from this. You can rename variables in C any way you
like. functionname as c_basename is to fix otherwise unavoidable collisions;
this seems like a nice-to-have. And I already have a lot on my plate. I could
consider it later but
Georg Brandl added the comment:
I guess custom converters are the answer here.
BTW, the args argument already works fine since adding it to c_keywords. No
need for a complicated structure :)
--
___
Python tracker rep...@bugs.python.org
Changes by Ryan Smith-Roberts r...@lab.net:
--
nosy: +rmsr
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Python-bugs-list mailing
Ryan Smith-Roberts added the comment:
Georg Brandl wrote:
Although now is a good time to ensure sensible argument names (I
usually look at the docs to find the documented ones), so that
switching the function to keyword arg support is basically just a
removal of '/'
I started doing this
New submission from Georg Brandl:
This is a request to be able to name C arguments differently from Python
arguments.
Two reasons:
* like for function renaming, some Python argument names are reserved in C
(default for example, used in sys.getsizeof())
* sometimes the function uses 'O' in
Changes by Georg Brandl ge...@python.org:
--
nosy: +serhiy.storchaka
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Python-bugs-list
Georg Brandl added the comment:
OK, I see that AC automatically handles case 1, great!
Still you have to decide if you like the code churn caused by case 2.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
Georg Brandl added the comment:
One more: I can't have an argument called args.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue20227
___
___
Zachary Ware added the comment:
I second this request. Every PyArg_ParseTupleAndKeywords-using function in
_winapi has a keyword argument overlapped which is stuffed into a C variable
use_overlapped, while the local variable overlapped is used for an
Overlapped object, which makes for a big
Georg Brandl added the comment:
There are also several PyArg_ParseTuple-using functions that have the
same kind of name mismatch, but since the names don't really mean
anything on the Python side when they're positional-only, I don't feel
too bad about changing them to make them make
21 matches
Mail list logo