Patches item #1549670, was opened at 2006-08-31 10:06
Message generated for change (Tracker Item Submitted) made by Item Submitter
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1549670&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Parser/Compiler
Group: Python 3000
Status: Open
Resolution: None
Priority: 5
Submitted By: Jiwon Seo (jiwon)
Assigned to: Nobody/Anonymous (nobody)
Summary: Implementation of PEP 3102 Keyword Only Argument

Initial Comment:
This patch is implementation of pep 3102, keyword-only
parameter.

Important changes include

 * code object now has co_kwonlyargcount to keep the
number of keyword only argument - this is analogous to
co_argcount.
 * function object now has func_kwdefaults (dictionary)
to keep the mapping between keyword only arguments and
defaults for them. Only kwonly argument with default
values are in the dictionary - this is analogous to
func_defaults.
 * APIs for code object changed - both C API and Python
Api. PyCode_New now takes number of keyword only
arguments, and new.code also takes number of keyword
only arguments.
 * MAKE_FUNCTION now takes another oparg, which is
number of default keyword only arguments - and the name
of keyword only argument and its default value are in
the value stack - it is similar to oparg of CALL_FUNCTION.
 * MAGIC in import.c changed, since bytecode is changed.

That's pretty much everything that's important, and the
rest is in the code itself.

And my patch passes all regression tests excepts
test_frozen.py, which depends on the hard-coded mashal
value, which needs to be regenerated when bytecode
changes. However, freeze.py is broken - specifically,
modulefinder.py is broken as Guido said. So, currently,
I commented it out.

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=1549670&group_id=5470
_______________________________________________
Patches mailing list
Patches@python.org
http://mail.python.org/mailman/listinfo/patches

Reply via email to