[Zope3-dev] Re: Can an adapter find out what name it was registered for?

Stephan Richter srichter at cosmos.phy.tufts.edu
Sat Nov 25 17:28:10 EST 2006


On Friday 17 November 2006 03:43, Chris Withers wrote:
> What do you suggest I do when the adapter needs to know the name it was
> registered for?

You can make the name part of the adapter API.

However, I would suggest revising the design; I have never come across a 
scenario where I wanted the name of the adapter be known within the adapter. 
This seems to be a recipe for trouble. 

Regards,
Stephan
-- 
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web Software Design, Development and Training


More information about the Zope3-dev mailing list