Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #21516
| From | Roy Smith <roy@panix.com> |
|---|---|
| Newsgroups | comp.lang.python |
| Subject | Re: How to break long method name into more than one line? |
| Date | 2012-03-11 20:43 -0400 |
| Organization | PANIX Public Access Internet and UNIX, NYC |
| Message-ID | <roy-7B01A0.20431211032012@news.panix.com> (permalink) |
| References | <mailman.571.1331492028.3037.python-list@python.org> <4f5d4390$0$29891$c3e8da3$5496439d@news.astraweb.com> |
In article <4f5d4390$0$29891$c3e8da3$5496439d@news.astraweb.com>,
Steven D'Aprano <steve+comp.lang.python@pearwood.info> wrote:
> You can't split tokens over multiple lines, or put any whitespace
> between them.
Well, if you truly wanted to be perverse, you could write some kind of
decorator:
@make_long_named_test_method('some',
'very',
'long',
'list',
'of',
'token',
'fragments')
def x(self):
blah, blah, blah
which creates a "test_some_very_long_list_of_token_fragments" method.
But it would be a lot easier to just use sane method names.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
How to break long method name into more than one line? Herman <sorsorday@gmail.com> - 2012-03-11 11:53 -0700
Re: How to break long method name into more than one line? Roy Smith <roy@panix.com> - 2012-03-11 15:11 -0400
Re: How to break long method name into more than one line? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-03-12 00:30 +0000
Re: How to break long method name into more than one line? Roy Smith <roy@panix.com> - 2012-03-11 20:43 -0400
Re: How to break long method name into more than one line? Dennis Lee Bieber <wlfraed@ix.netcom.com> - 2012-03-12 12:24 -0400
Re: How to break long method name into more than one line? Chris Angelico <rosuav@gmail.com> - 2012-03-13 08:59 +1100
Re: How to break long method name into more than one line? Jean-Michel Pichavant <jeanmichel@sequans.com> - 2012-03-13 11:30 +0100
Re: How to break long method name into more than one line? Chris Angelico <rosuav@gmail.com> - 2012-03-13 21:35 +1100
csiph-web