This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author nikratio
Recipients larry, nikratio, skrah
Date 2014-01-22.04:39:35
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1390365578.48.0.715708996501.issue20177@psf.upfronthosting.co.za>
In-reply-to
Content
As discussed on devel, here's an updated patch for timemodule.c that
uses a custom C converter to handle the parse_time_t_args() utility
function. The only function I did not convert is mktime, because I did
not find a way to do so without duplicating the gettmarg() utility
function (which cannot be converted because it is also called by other
C functions).

You probably want to take a close look at what I did to the strptime
function. I didn't see a way to include the actual default value
(rather than None) in the signature without reconstructing the
argument tuple for calling the Python implementation.

As far as I can see, this completes the conversion for timemodule.c. I'll
work on _datetimemodule.c next, but I'm not sure I'll have time before
next weekend.

This is probably already planned, but since I haven't seen it in
Misc/NEWS yet: I think it would be a good idea to entry informing the
user about the conversion from strictly optional parameters to
parameters with default values. Eg.:

 * Issues xxx, yyy, zzz: many functions in the standard library now
   accept `None` for optional arguments. Previously, specifying `None`
   mostly resulted in a `TypeError`. Starting with this version,
   passing `None` is equivalent to not specfying the parameter.
History
Date User Action Args
2014-01-22 04:39:39nikratiosetrecipients: + nikratio, larry, skrah
2014-01-22 04:39:38nikratiosetmessageid: <1390365578.48.0.715708996501.issue20177@psf.upfronthosting.co.za>
2014-01-22 04:39:38nikratiolinkissue20177 messages
2014-01-22 04:39:38nikratiocreate