Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!nntp.club.cc.cmu.edu!micro-heart-of-gold.mit.edu!bloom-beacon.mit.edu!bloom-beacon.mit.edu!panix!not-for-mail From: Grant Edwards Newsgroups: comp.lang.python Subject: Re: Making every no-arg method a property? Date: Tue, 5 Aug 2014 21:14:15 +0000 (UTC) Organization: PANIX Public Access Internet and UNIX, NYC Lines: 42 Message-ID: References: NNTP-Posting-Host: dsl.comtrol.com X-Trace: reader1.panix.com 1407273255 4175 64.122.56.22 (5 Aug 2014 21:14:15 GMT) X-Complaints-To: abuse@panix.com NNTP-Posting-Date: Tue, 5 Aug 2014 21:14:15 +0000 (UTC) User-Agent: slrn/1.0.1 (Linux) Xref: csiph.com comp.lang.python:75758 On 2014-08-05, Christian Calderon wrote: > 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. Did I miss a news story? Have the parentesis mines all exploded causing the price of parenthesis to skyrocket? > 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 Here's an idea: when using Python, write Python. Just type the parens. I know it requires hitting the shift key and all, but it's not that hard -- especially if you have two hands. If you want to write Ruby, then use Ruby. > I was wondering what other thought of this, is it an overly fanciful > way of coding python, IMO, it's a huge waste of time and an excellent way to reduce both readability and maintainability of your code. > or is it an acceptable thing to do in a real project? No. It's not acceptable. Not even a tiny bit. > Also, would anyone be interested in helping me make this metaclass? Um... [I have the nagging feeling I've been trolled...] -- Grant Edwards grant.b.edwards Yow! Everywhere I look I at see NEGATIVITY and ASPHALT gmail.com ...