Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #75754
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!eternal-september.org!feeder.eternal-september.org!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail |
|---|---|
| Return-Path | <calderon.christian760@gmail.com> |
| X-Original-To | python-list@python.org |
| Delivered-To | python-list@mail.python.org |
| X-Spam-Status | OK 0.051 |
| X-Spam-Evidence | '*H*': 0.90; '*S*': 0.00; 'python,': 0.02; 'subject:method': 0.09; 'python': 0.11; ':-p': 0.16; 'fancy': 0.16; 'metaclass': 0.16; 'coding': 0.22; 'decorators': 0.24; 'function': 0.29; 'wondering': 0.29; 'message-id:@mail.gmail.com': 0.30; 'project?': 0.31; 'anyone': 0.31; 'something': 0.35; 'received:google.com': 0.35; 'acceptable': 0.36; 'subject:?': 0.36; 'similar': 0.36; 'to:addr:python-list': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'either': 0.39; 'real': 0.63; 'provide': 0.64; 'realized': 0.68; 'helping': 0.70; 'subject:Making': 0.84 |
| DKIM-Signature | v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=kHbk9WlcU8BWN+07puxsLGc14zLqtnw992DbwKtJru8=; b=yZmBQsYhUi1WySBklDf0PN6cEDyYTyKkabXoG0tip4/DVVuv9UXxH+e+UGTrr369US dJfXpzlhKRlmXS/Wopg86/rDQvY/O4SAxpYuMD9qAmtILLmWMtAOWlee1m2WOG9/QYpQ q0exnK66cTeiiAMB99PndaQ0PFFlZdtJ5A2sgWE/7zKqe556k/71yDrN5JWFrU5mWosR AMTBVQaws3wLbU+6W+eOHdNiUkNH1V6p1ip1VUhP7ufeJ2XxY7U+J+zBUPuccBc+AqN4 S9n7rcqdLs/LeoHfOjNO0zL2KqhssApaVH8oHFqBD517G/O8PG+yNrYXzGpfkJ4c4SLI +r/Q== |
| MIME-Version | 1.0 |
| X-Received | by 10.236.83.103 with SMTP id p67mr8753327yhe.89.1407267559015; Tue, 05 Aug 2014 12:39:19 -0700 (PDT) |
| Date | Tue, 5 Aug 2014 12:39:18 -0700 |
| Subject | Making every no-arg method a property? |
| From | Christian Calderon <calderon.christian760@gmail.com> |
| To | python-list@python.org |
| Content-Type | multipart/alternative; boundary=20cf301af2c3f5968804ffe702fc |
| X-Mailman-Approved-At | Tue, 05 Aug 2014 22:50:11 +0200 |
| 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.12674.1407271813.18130.python-list@python.org> (permalink) |
| Lines | 31 |
| NNTP-Posting-Host | 2001:888:2000:d::a6 |
| X-Trace | 1407271813 news.xs4all.nl 2974 [2001:888:2000:d::a6]:36322 |
| X-Complaints-To | abuse@xs4all.nl |
| Xref | csiph.com comp.lang.python:75754 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
I have been using python for 4 years now, and I just started learning ruby. I like that in ruby I don't have to type parenthesis at the end of each function call if I don't need to provide extra arguments. I just realized right now that I can do something similar in python, if I make all methods with only the implicitly passed 'self' into properties. Which means I can either do some fancy coding and make a metaclass that does this auto-magically, or I have to have property decorators all over the place :-P . I was wondering what other thought of this, is it an overly fanciful way of coding python, or is it an acceptable thing to do in a real project? Also, would anyone be interested in helping me make this metaclass?
Back to comp.lang.python | Previous | Next — Next in thread | Find similar | Unroll thread
Making every no-arg method a property? Christian Calderon <calderon.christian760@gmail.com> - 2014-08-05 12:39 -0700
Re: Making every no-arg method a property? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-08-05 13:57 -0700
Re: Making every no-arg method a property? Grant Edwards <invalid@invalid.invalid> - 2014-08-05 21:14 +0000
Re: Making every no-arg method a property? Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-08-06 10:34 +1200
Re: Making every no-arg method a property? Grant Edwards <invalid@invalid.invalid> - 2014-08-06 05:13 +0000
Re: Making every no-arg method a property? Rob Gaddi <rgaddi@technologyhighland.invalid> - 2014-08-06 09:53 -0700
Re: Making every no-arg method a property? alister <alister.nospam.ware@ntlworld.com> - 2014-08-06 10:09 +0000
Re: Making every no-arg method a property? Terry Reedy <tjreedy@udel.edu> - 2014-08-06 15:04 -0400
Re: Making every no-arg method a property? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-08-06 10:49 +1000
Re: Making every no-arg method a property? Chris Angelico <rosuav@gmail.com> - 2014-08-06 12:07 +1000
Re: Making every no-arg method a property? Steven D'Aprano <steve@pearwood.info> - 2014-08-06 09:15 +0000
Re: Making every no-arg method a property? Chris Angelico <rosuav@gmail.com> - 2014-08-06 21:26 +1000
Re: Making every no-arg method a property? alister <alister.nospam.ware@ntlworld.com> - 2014-08-06 10:12 +0000
csiph-web