divmod-users team mailing list archive
-
divmod-users team
-
Mailing list archive
-
Message #00017
Re: [Axiom] Why does Empowered.__conform__ need a store?
Okay, I have a failing test case, it's on Launchpad:
https://code.launchpad.net/~lvh/divmod.org/storeless-conform-1118498
Why does powerupsFor not have a special case for IPowerupIndirector? is
empowered.powerupsFor(IPowerupIndirector) a valid thing to do? What does
that *mean*?
Currently that specialcase is only in powerupsFor.
I'm considering replacing the implementation of __conform__ with:
try:
return self.powerupsFor(interface).next()
except AttributeError: # self.store == None, self.store.query ->
AttributeError
return None
... modulo the IPowerupIndirector thing, which may have to move to
powerupsFor or may have to be included in that definition.
On Thu, Feb 7, 2013 at 5:33 PM, Laurens Van Houtven <_@xxxxxx> wrote:
> Okay, cool, I'm writing a failing test case now.
>
> On Thu, Feb 7, 2013 at 3:06 PM, Tristan Seligmann
> <mithrandi@xxxxxxxxxxxxx> wrote:
> > On Thu, Feb 7, 2013 at 12:39 PM, Laurens Van Houtven <_@xxxxxx> wrote:
> >> Empowered.__conform__ gives up if there is no store. That makes sense
> >> for persisted powerups (obviously), but it means that the following
> >> doesn't work:
> >
> > If inMemoryPowerUp and powerupsFor work for unstored items then I
> > think __conform__ ought to work as well.
> > --
> > mithrandi, i Ainil en-Balandor, a faer Ambar
> >
> > --
> > Mailing list: https://launchpad.net/~divmod-users
> > Post to : divmod-users@xxxxxxxxxxxxxxxxxxx
> > Unsubscribe : https://launchpad.net/~divmod-users
> > More help : https://help.launchpad.net/ListHelp
>
>
>
> --
> cheers
> lvh
>
--
cheers
lvh
Follow ups
References