Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #69529

Ideas for Python 4

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!news.mixmin.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rymg19@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.074
X-Spam-Evidence '*H*': 0.85; '*S*': 0.00; 'resulting': 0.04; 'argument': 0.05; 'subject:Python': 0.06; 'python': 0.11; '"it\'s': 0.16; 'switch': 0.26; 'message-id:@mail.gmail.com': 0.30; 'comments': 0.31; 'easier': 0.31; 'asks': 0.31; 'bunch': 0.31; 'concise': 0.31; 'implicit': 0.31; 'indentation': 0.31; 'multiline': 0.31; "i'd": 0.34; 'anybody': 0.35; 'received:google.com': 0.35; 'add': 0.35; 'c++': 0.36; 'ryan': 0.36; 'method': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'even': 0.60; 'remove': 0.60; 'simple,': 0.60; 'skip:a 50': 0.61; 'skip:n 10': 0.64; '"not': 0.84; 'wait,': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:from:date:message-id:subject:to:content-type; bh=sistb/DskJduRYZbws3Kj/T9jp0IhH98MDM6SAZs6WY=; b=bNpqt5qCvt1frsAXbkBMBg4o+tQvGd8gM/iZeVYanloS6oa2E7mwdr8duygd96yeL+ EHf8bRSvw0cc1YAC/ZywEbDqaGFu3SHr2Dy+Vym/hWR5oHy7kAcRFUtdj5EubpWu9HcR vrpgPdMXr+onPxr9bTbu2MsbZBr4/VEAytwLBG81YsWgNz4J4sZ9CWZu4cIAoWq1mG13 uVBkhvaB7wjUh+pQSA/DZlnbBPxZCvwEfJ+1qB44DlPg2ewGwHvB4rzVBYTE7xgSuUNs Ros7WGkKL6xuEEZUC+6Uj5mgk0yeZI7cTNkXBXrTHgsVRQ3SGZaV75CkRTsB0vD3Ynif fsxA==
X-Received by 10.180.38.110 with SMTP id f14mr24370174wik.0.1396403704224; Tue, 01 Apr 2014 18:55:04 -0700 (PDT)
MIME-Version 1.0
From Ryan Gonzalez <rymg19@gmail.com>
Date Tue, 1 Apr 2014 20:54:44 -0500
Subject Ideas for Python 4
To python-list@python.org
Content-Type multipart/alternative; boundary=e89a8f6439b8c0e2d404f60592b4
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://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 <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.8810.1396403705.18130.python-list@python.org> (permalink)
Lines 82
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1396403705 news.xs4all.nl 2946 [2001:888:2000:d::a6]:33776
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:69529

Show key headers only | View raw


[Multipart message — attachments visible in raw view] - view raw

I have a bunch of ideas I'd like to share for Python 4:

Use -- for comments instead of #.

Switch to <> for "not equal" instead of !=.

Remove indentation requirement:

-- Python 2&3
if x != y:
    return 7

-- Python 4
if x <> y:
    return 7
;;

Add multiline lambdas:

my_multiline_lambda = ll { return 7; }

Add implicit lambdas using a clear, simple, and concise syntax:

my_implicit_lambda = ??[0] + ??[1] if ??#? != 0
-- ?? = argument dictionary
-- ??#? = argument count

Add method chaining using even easier syntax:

a = SomeObject()
b = a->>>m2->>>m3->>>m4!!;;

-- Call m2, then m3, then m4, then return the resulting object

-- BTW, April Fools! This is ugly...

-- 
Ryan
If anybody ever asks me why I prefer C++ to C, my answer will be simple:
"It's becauseslejfp23(@#Q*(E*EIdc-SEGFAULT. Wait, I don't think that was
nul-terminated."

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Ideas for Python 4 Ryan Gonzalez <rymg19@gmail.com> - 2014-04-01 20:54 -0500

csiph-web