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/2000-November/010581.html below:

[Python-Dev] Work in progress - coercion/cmp overhaul

[Python-Dev] Work in progress - coercion/cmp overhaul [Python-Dev] Work in progress - coercion/cmp overhaulM.-A. Lemburg mal@lemburg.com
Mon, 13 Nov 2000 16:32:04 +0100
Neil Schemenauer wrote:
> 
> I making this available now in the hope that it will generate
> some dicussion:
> 
>     http://arctrix.com/nas/python/coerce-2.diff
> 
> The patch is based on Marc-Andre Lemburg's coercion patch for
> 1.5.1 downloaded from the starship:
> 
>     http://starship.python.net/~lemburg/CoercionProposal.html
> 
> All credit goes to him.  The bugs are probably introduced by me.
> What the patch does:
> 
>   - Introduces a new type flag "NEWSYTLENUMBER".  If this flag is
>     set then the tp_as_number methods are treated differently.
>     Coercion is not done before passing arguments to the method.
>     New style methods do their own coercion or return the
>     NotImplemented singleton.  See Marc's page for more details.

Very nice !

I wanted to suggest the usage of a type flag
instead of the slot magic in the original patch too -- your time
machine was faster ;-)
 
>   - Decide on handling of nb_coerce slot (eg. should it be called
>     on new style numbers).

Probably not, since all coercion is now handled by the slots
themselves.

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/



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