[pypy-dev] oopspec
Armin Rigo
arigo at tunes.org
Wed May 3 00:06:24 CEST 2006
Hi Antonio,
On Tue, May 02, 2006 at 12:01:27PM +0200, Antonio Cuni wrote:
> Btw, I have a doubt about oopspec, too: Armin told that the 'oopspec'
> specifies the "abstract" operation that each ll_* helper implements;
> does this abstract operation have to be one of standard list methods or
> can I add new operations? I was thinking to add a 'll_remove_range' or
> similar to be used by other helpers such as delslice and company; this
> way backends can replace ll_remove_range with their
> almost-surely-present equivalent without having to care about
> python-specific logic such as slices or so.
It's quite open; every piece of code using oopspec should be prepared to
see names that it doesn't know about, and ignore them. So feel free to
add new names. As a guideline, let's stick as far as possible to the
Python name for the method or for the __xxx__ special method name (with
__ removed): 'remove_range' looks like it could be called 'delslice' in
oopspec.
A bientot,
Armin
More information about the Pypy-dev
mailing list