Re: python3: 'where' keyword

From: AdSR (adsr_at_poczta.onet.pl)
Date: 01/08/05


Date: Sat, 08 Jan 2005 11:30:57 +0100

Nick Coghlan wrote:
>
> Killer app for this keyword:
>
> class C(object):
>
> x = property(get, set) where:
> def get(self):
> return "Silly property"
> def set(self, val):
> self.x = "Told you it was silly"

Hey, this is super-elegant!

AdSR



Relevant Pages