[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [pygame] Py C/API - Using METH_O vs METH_VARARGS
- To: pygame-users@xxxxxxxx
- Subject: Re: [pygame] Py C/API - Using METH_O vs METH_VARARGS
- From: "Campbell Barton" <ideasman42@xxxxxxxxx>
- Date: Fri, 12 Dec 2008 17:04:03 +1100
- Delivered-to: archiver@xxxxxxxx
- Delivered-to: pygame-users-outgoing@xxxxxxxx
- Delivered-to: pygame-users@xxxxxxxx
- Delivery-date: Fri, 12 Dec 2008 01:04:07 -0500
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=WKGHvgxzXojdD3ZexiEwsUbTRv9UCpLTtLAnw5pH2ZI=; b=ojx9i6ENrie6UzhPzib50VI9GX+0xzuMCY9dAQ/lvuqQu9ZwCk+bUXxRDljDv91uzx Srjsv1aifLX0A8VrRnhxGoVlhojvHNxhIZWKFXXiyGF4rlx0nHmOcm5Ff6GP1xtPZ7Y+ kglVdo/1Ru+Fkd+xdVD60hnT83ws96wdzeXhw=
- Domainkey-signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=frh+QfGQt/FToVx9K/7PPUAoBoilkWXDwQFx4QNl7+LAuHFbaJVXO5GibkSEe9QAK1 NqFy1dLlaAE0HK0NpN8Q3EJnZVwM5AJjposcEcbaZaSNebpSnzDOjBBMKkp7gfQj3QKi JZq/HLjTsAp0kwp8uDFaZYpE+CaSRbOEcF5SU=
- In-reply-to: <4941A55A.4070503@xxxxxxxxx>
- References: <7c1ab96d0812111447k3d4a5f21h6c12a7d3ff896441@xxxxxxxxxxxxxx> <4941A55A.4070503@xxxxxxxxx>
- Reply-to: pygame-users@xxxxxxxx
- Sender: owner-pygame-users@xxxxxxxx
On Fri, Dec 12, 2008 at 10:42 AM, Lenard Lindstrom <len-l@xxxxxxxxx> wrote:
> Hi Cambell,
>
> Thanks for the suggestion. It would simplify some code. Though I can't speak
> for the other Pygame developers, I believe on proposed change is to make all
> Pygame functions accept keyword arguments. Some functions already do, so
> maybe they all should to be consistent.
>
> Lenard
>
> Campbell Barton wrote:
>>
>> Noticed METH_O isnt used anywhere in pygame, this avoids creating a
>> tuple only to get a single PyObject back out with PyArg_ParseTuple().
>>
>>
>
> --
> Lenard Lindstrom
> <len-l@xxxxxxxxx>
>
>
Hey Lenard & PyGamers
Re: Using Keywords,
if you read Python 2.x-3.0 source youll see they dont use keywords for
everything (use METH_O in many places too).
This seems a bit overkill for single argument functions to me, and
wont make the api any easier to use?
Id be interested to know what the perceived advantages are for this.
--
- Campbell