Dieter Maurer wrote:
The "str" example shows also that it is not sensible
that the adapter registry framework gives the adapter (factory)
a way to determine its name ("str" has nothing where the "name"
could be sticked in).
True enough, I guess I'll just have to stick with my hack or Tres'
cur
Chris Withers wrote at 2006-11-28 18:09 +:
>Benji York wrote:
>> Chris Withers wrote:
>>> I don't think it'll be a common pattern, but it doesn't feel right to
>>> me that a named adapter (ie: one registered with a specific name) has
>>> no way of finding out what name it has been registered
Previously Stephan Richter wrote:
> On Wednesday 29 November 2006 03:37, Wichert Akkerman wrote:
> > The fact that something is true in Zope 3 does not necessarily make it a
> > good idea.
>
> But the chances are pretty high! ;-)
Of course I meant to say 'Zope 2' there, which does reduce the chan
On Wednesday 29 November 2006 03:37, Wichert Akkerman wrote:
> The fact that something is true in Zope 3 does not necessarily make it a
> good idea.
But the chances are pretty high! ;-)
Regards,
Stephan
--
Stephan Richter
CBU Physics & Chemistry (B.S.) / Tufts Physics (Ph.D. student)
Web2k - Web
Previously Chris Withers wrote:
> Really? Certainly in Zope 2, prettymuch every persistent objects needs
> to be getId()'able...
The fact that something is true in Zope 3 does not necessarily make it a
good idea.
Wichert.
--
Wichert Akkerman <[EMAIL PROTECTED]>It is simple to make things.
Benji York wrote:
Really? Now this is a use case I hadn't thought of.. can you give me
some examples of where you've run into this?
I don't know that I have, but the component system doesn't preclude it
so anything we come up with will have to take it into effect.
I'll whisper yagni at this
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Benji York wrote:
> Chris Withers wrote:
>> Benji York wrote:
>>> Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way o
On Tue, Nov 28, 2006 at 06:12:19PM +, Chris Withers wrote:
> Is there a python-only way to register adapters instead of in ZCML and,
> if it exists, is it safe to use in conjunction with the normal zcml dances?
There's always a way :)
You could just do what the directive does - call the adapt
Chris Withers wrote:
Benji York wrote:
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way of finding out what name it has been registered with...
Because the same adapter can be
Tres Seaver wrote:
for name in ('vindaloo', 'madras', 'tiki_masala'):
globals()[name] = MNA_factory_maker(name)
and then in ZCML:
...but here you have to specify the same info twice and hence duplicate
info and get it identical in two places, which feels icky to me.
Is there a
Benji York wrote:
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to
me that a named adapter (ie: one registered with a specific name) has
no way of finding out what name it has been registered with...
Because the same adapter can be registered more tha
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Chris Withers wrote:
> Stephan Richter wrote:
>> 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.
>
On Monday 27 November 2006 11:17, Benji York wrote:
> This seems somewhat analogous to a Python object being given multiple
> names. In that case too, there is no way for the object to know what
> it's names are.
Great analogy. I used that one before too, but did not think of it this time.
Regar
Chris Withers wrote:
I don't think it'll be a common pattern, but it doesn't feel right to me
that a named adapter (ie: one registered with a specific name) has no
way of finding out what name it has been registered with...
Because the same adapter can be registered more than once, it would
a
Stephan Richter wrote:
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.
Not sure what you mean by this?
However, I would suggest revising the design;
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 n
Chris Withers wrote:
Philipp von Weitershausen wrote:
Chris Withers wrote:
Can a named adapter find out the name it was registered with during
the adaptation process?
Nope.
I can see why it's that way, but it seems a shame and maybe even an
oversight :-/
What do you suggest I do when the
Philipp von Weitershausen wrote:
Chris Withers wrote:
Can a named adapter find out the name it was registered with during
the adaptation process?
Nope.
I can see why it's that way, but it seems a shame and maybe even an
oversight :-/
What do you suggest I do when the adapter needs to know
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Philipp von Weitershausen wrote:
> Chris Withers wrote:
>> Can a named adapter find out the name it was registered with during the
>> adaptation process?
>
> Nope.
But you can create the adapter factories in such a way that they know
that name, via
Chris Withers wrote:
Can a named adapter find out the name it was registered with during the
adaptation process?
Nope.
--
http://worldcookery.com -- Professional Zope documentation and training
___
Zope3-dev mailing list
Zope3-dev@zope.org
Unsub: ht
20 matches
Mail list logo