Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #9777
| Path | csiph.com!x330-a1.tempe.blueboxinc.net!newsfeed.hal-mli.net!feeder3.hal-mli.net!news.glorb.com!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <ian.g.kelly@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.002 |
| X-Spam-Evidence | '*H*': 1.00; '*S*': 0.00; 'example:': 0.03; 'arguments': 0.05; ':-)': 0.06; 'subject:method': 0.09; 'syntax': 0.11; '(note:': 0.16; '(x,': 0.16; 'blah': 0.16; 'jumping': 0.16; 'subject:function': 0.16; 'subject:syntax': 0.16; 'cc:addr:python- list': 0.16; 'def': 0.16; 'cc:2**0': 0.21; 'cc:no real name:2**0': 0.22; 'header:In-Reply-To:1': 0.22; 'interpreted': 0.23; 'charset:iso-8859-7': 0.25; 'in:': 0.25; 'keyword': 0.25; 'pass': 0.28; 'message-id:@mail.gmail.com': 0.28; 'cc:addr:python.org': 0.30; 'construct': 0.30; 'class': 0.31; 'required.': 0.31; 'changes': 0.31; "can't": 0.34; 'subject:/': 0.36; 'idea': 0.36; 'error.': 0.36; 'could': 0.37; 'received:google.com': 0.38; 'received:209.85.161': 0.38; 'received:209.85': 0.38; 'subject:: ': 0.38; 'help': 0.39; 'received:209': 0.40; 'called': 0.40; 'order': 0.62; '"put': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type:content-transfer-encoding; bh=VAOLUt0ffFnXs4c9KcbmqhHWnwS/h4gYxoU4wBu9j8w=; b=iyI413eXf/HAuva5wIqT1KNohJTmHU817jIjoWLJggU7noNmUhYC0R3Ne4ZmVoVNZr eSK7FGQHb8GmomRcbo1FGOqQ8oNPiEFe7OPbz2gRd4q0szz2rUR7A9hRbHbHSOOS3Gtq WiQmNWtpHUIPfOpE1Lr4LvumKvlmMde2dfySs= |
| MIME-Version | 1.0 |
| In-Reply-To | <e3275985-7cb4-4144-8962-17f0ed4658be@l18g2000yql.googlegroups.com> |
| References | <e3275985-7cb4-4144-8962-17f0ed4658be@l18g2000yql.googlegroups.com> |
| From | Ian Kelly <ian.g.kelly@gmail.com> |
| Date | Sun, 17 Jul 2011 21:29:45 -0600 |
| Subject | Re: Crazy what-if idea for function/method calling syntax |
| To | ΤΖΩΤΖΙΟΥ <tzotzioy@gmail.com> |
| Content-Type | text/plain; charset=ISO-8859-7 |
| Content-Transfer-Encoding | quoted-printable |
| Cc | python-list@python.org |
| X-BeenThere | python-list@python.org |
| X-Mailman-Version | 2.1.12 |
| Precedence | list |
| List-Id | General discussion list for the Python programming language <python-list.python.org> |
| List-Unsubscribe | <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.1201.1310959816.1164.python-list@python.org> (permalink) |
| Lines | 35 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1310959816 news.xs4all.nl 23852 [2001:888:2000:d::a6]:42573 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | x330-a1.tempe.blueboxinc.net comp.lang.python:9777 |
Show key headers only | View raw
2011/7/17 ΤΖΩΤΖΙΟΥ <tzotzioy@gmail.com>:
> Jumping in:
>
> What if a construct
>
> xx(*args1, **kwargs1)yy(*args2, **kwargs2)
>
> was interpreted as
>
> xxyy(*(args1+args2), **(kwargs1+kwargs2))
>
> (Note: with **(kwargs1+kwargs2) I mean "put keyword arguments in the
> order given", since dicts can't be added)
>
> This construct is currently a syntax error. The intent of this idea is
> to help improve legibility.
>
> Example:
> def place_at(item, x, y): blah blah
> could be called as
> place(item)_at(x, y)
class place(object):
def __init__(self, item):
self.__item = item
def at(self, x, y):
# place self.__item at (x, y)
pass
Then you can do:
place(item).at(x, y)
No syntax changes required. :-)
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Crazy what-if idea for function/method calling syntax ΤΖΩΤΖΙΟΥ <tzotzioy@gmail.com> - 2011-07-17 15:54 -0700
Re: Crazy what-if idea for function/method calling syntax Thomas Jollans <t@jollybox.de> - 2011-07-18 01:19 +0200
Re: Crazy what-if idea for function/method calling syntax Cameron Simpson <cs@zip.com.au> - 2011-07-18 12:04 +1000
Re: Crazy what-if idea for function/method calling syntax Ian Kelly <ian.g.kelly@gmail.com> - 2011-07-17 21:29 -0600
Re: Crazy what-if idea for function/method calling syntax Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2011-07-18 15:54 +1000
Re: Crazy what-if idea for function/method calling syntax Pierre Quentel <pierre.quentel@gmail.com> - 2011-07-18 13:34 -0700
csiph-web