[Python-ideas] breaking out of module execution
Matt Joiner
anacrolix at gmail.com
Wed Apr 25 10:24:30 CEST 2012
If not use_simple_api:
class C:
On Apr 25, 2012 4:19 PM, "Mark Shannon" <mark at hotpy.org> wrote:
> Greg Ewing wrote:
>
>> Nick Coghlan wrote:
>>
>>> It isn't quite as simple as
>>> just deleting those lines though, since we likely still wouldn't want
>>> to allow return statements in class bodies.
>>>
>>
>> I'm sure there's someone out there with a twisted enough
>> mind to think of a use for that...
>>
>>
> It's not that twisted.
>
> class C:
>
> def basic_feature(self):
> ...
>
> if use_simple_api:
> return
>
> def advanced_feature(self):
> ...
>
> Not that this is a good use, but it is a use :)
>
> Cheers,
> Mark.
>
> ______________________________**_________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/**mailman/listinfo/python-ideas<http://mail.python.org/mailman/listinfo/python-ideas>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20120425/30edfea9/attachment.html>
More information about the Python-ideas
mailing list