suggestion for python function calling

alex goretoy aleksandr.goretoy at gmail.com
Sun Mar 15 03:08:38 EDT 2009


basically

import os
def quacks(self,value):
    return (1,0)[value]
_aduck="~/goose"
duck = if os.path.exists quacks str(_aduck)
duck()()

or does this get in the way with some other pre-existing syntax
interpretation implementations?

-Alex Goretoy
http://www.goretoy.com



On Sun, Mar 15, 2009 at 1:54 AM, alex goretoy
<aleksandr.goretoy at gmail.com>wrote:

> hi i have a suggestion, surely this wont wonk, and is merely a suggestion
> to aedd this type of syntax to python
>
> This is an insperation from peps 318
>
>> def foo(self):
>>     perform method operation
>> foo = classmethod(foo)
>>
>> where it says perform mthod operation, why not have that be an actual
> syntax?
> having those words initialized as functions lists dict generators, etc...
>
>  then you could do something like:
>
> new_variable = function variable function variable
>
> duck = if os.path.walk talk must _duck
>
> or something to this nature and then you could either make it call
> functions later
>
> duck().().()
> or
> fuck(().())
> or
> something like that, I'mma go to sleep now....I think this way it might the
> language even stonger, but who knows, what do you all think? Not trying to
> make it like ruby, just more options to the interpreter, and syntax styles
> -Alex Goretoy
> http://www.goretoy.com
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20090315/e2ff6da1/attachment-0001.html>


More information about the Python-list mailing list