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 arigo
Recipients Carl.Friedrich.Bolz, amaury.forgeotdarc, arigo, fijal, theller
Date 2008-01-15.15:12:33
SpamBayes Score 0.2070997
Marked as misclassified No
Message-id <1200409954.85.0.177101156964.issue1831@psf.upfronthosting.co.za>
In-reply-to
Content
The pure Python implementation we just wrote in PyPy is:

    for name, arg in zip(names, args):
        if name in kwds:
            raise TypeError("duplicate value for argument %r" % (
                name,))
        self.__setattr__(name, arg)
    for name, arg in kwds.items():
        self.__setattr__(name, arg)

It's the same logic as in _ctypes.c:Struct_init(), where you can add the
C equivalent of "if name in kwds" after getting the name.
History
Date User Action Args
2008-01-15 15:12:35arigosetspambayes_score: 0.2071 -> 0.2070997
recipients: + arigo, theller, amaury.forgeotdarc, fijal, Carl.Friedrich.Bolz
2008-01-15 15:12:34arigosetspambayes_score: 0.2071 -> 0.2071
messageid: <1200409954.85.0.177101156964.issue1831@psf.upfronthosting.co.za>
2008-01-15 15:12:33arigolinkissue1831 messages
2008-01-15 15:12:33arigocreate