Message81137
The reason I like the simplegeneric name is that that is exactly what
this feature is: a *simple* generic implementation that is deliberately
limited to dispatching on the first argument (because that is easily
explained to users that are already familiar with OOP and especially the
existing Python magic method dispatch mechanism.
So the name isn't just about avoiding name clashes, it's also about
setting appropriate expectations as to what is supported. Yes, the name
is a little clumsy but one thing I do *not* want to see happen is a
swathe of feature requests asking that this become an all-singing
all-dancing generic function mechanism like RuleDispatch.
Don't forget that actually *writing* generic functions (i.e. using the
@functools.simplegeneric decorator itself) should be far less common
than using the .register() method of existing generic functions. |
|
Date |
User |
Action |
Args |
2009-02-04 11:48:10 | ncoghlan | set | recipients:
+ ncoghlan, paul.moore, ryan.freckleton |
2009-02-04 11:48:09 | ncoghlan | set | messageid: <1233748089.81.0.826175896921.issue5135@psf.upfronthosting.co.za> |
2009-02-04 11:48:08 | ncoghlan | link | issue5135 messages |
2009-02-04 11:48:07 | ncoghlan | create | |
|