A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2006-March/062834.html below:

[Python-Dev] PySet API

[Python-Dev] PySet APIAlex Martelli aleaxit at gmail.com
Sun Mar 26 08:57:32 CEST 2006
On Mar 25, 2006, at 9:57 PM, Aahz wrote:

> I'd really like to see someone else who understands the issues (i.e.
> using the Python C-API) weigh in.  Both Barry and Raymond are clever
> programmers who generally understand what's Pythonic, and I find  
> myself
> agreeing with whoever posted last.  ;-)  Having another perspective
> would probably shed some light here.

My general preference is rather well-known, and I quote the advice I  
gave in "Python in a Nutshell"...:
"""
Some of the functions callable on specifically-typed objects [...]  
duplicate functionality that is also available from PyObject_  
functions; in these cases, you should almost invariably use the more  
general PyObject_ function instead. I don’t cover such almost- 
redundant functions in this book.
"""

However, I don't go as far as suggesting PyObject_CallMethod and the  
like... I'd much rather have abstract-layer PyObject_... functions,  
as long as they're applicable to two or more concrete built-in types  
(for example, IMHO adding PyObject_Clear is a no-brainer -- it's  
obviously right).  And I'm on the fence regarding the specific issue  
of PySet_Next.

So, having carefully staked out a position smack in the middle, I  
cheerfully now expect to be fired upon from both sides!-)


Alex

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4