Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #46341
| From | Carlos Nepomuceno <carlosnepomuceno@outlook.com> |
|---|---|
| Subject | RE: Python #ifdef |
| Date | 2013-05-28 23:54 +0300 |
| References | <ko34rq$m2s$1@reader1.panix.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.2326.1369774488.3114.python-list@python.org> (permalink) |
---------------------------------------- > From: invalid@invalid.invalid > Subject: Re: Python #ifdef > Date: Tue, 28 May 2013 20:42:34 +0000 > To: python-list@python.org [...] > Here's the important lesson from this thread: > > Instead of asking "how do I write X in Python" where yoy've assumed X > is the solution to your problem, you're usually better off asking how > to solve the underlying problem in a Pythonic way. > > IOW, instead of asking about a Python preprocessor (which you have > assumed is the solution to the problem because that's how you would do > it in C), ask about the actual problem (how to define a function > differently depending on Python version). > > People on this list are very inventive and will expend a surprising > amount of time to figure out often too-clever ways to do X because you > asked how to do X -- even if doing X is a lousy way to solve your > actual problem... > > When asking how do I solve a problem, it's OK to illustrate that > question with an example X of how you would solve it in C or Java or > Ruby or Perl or whatever, but remember > > 1) Not everybody here knows C or Java or Ruby or Perl or whatever, > and the person who _does_ know everyting there is to know about > solving some particular underlying problem isn't going to go > learn a new language so that they can understand your example and > figure out what you're trying to accomplish. > > 2) Programming languages differ. X may be the best way to solve the > problem in one language, but it might be an awful way to do it in > another language. > > -- > Grant Edwards grant.b.edwards Yow! I'm ANN LANDERS!! > at I can SHOPLIFT!! > gmail.com You're right! Sometimes I hate myself for doing exactly the opposite of what I would like to do! Unfortunately I can't change the thread subject. How do you have "invalid@invalid.invalid" instead of your email address?
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Python #ifdef Joel Goldstick <joel.goldstick@gmail.com> - 2013-05-28 15:49 -0400
Re: Python #ifdef Neil Cerutti <neilc@norwich.edu> - 2013-05-28 20:00 +0000
RE: Python #ifdef Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-28 23:07 +0300
Re: Python #ifdef Grant Edwards <invalid@invalid.invalid> - 2013-05-28 20:12 +0000
RE: Python #ifdef Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-28 23:22 +0300
Re: Python #ifdef Grant Edwards <invalid@invalid.invalid> - 2013-05-28 20:42 +0000
RE: Python #ifdef Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-28 23:54 +0300
Re: Python #ifdef Grant Edwards <invalid@invalid.invalid> - 2013-05-29 14:45 +0000
RE: Python #ifdef Fábio Santos <fabiosantosart@gmail.com> - 2013-05-28 21:34 +0100
RE: Python #ifdef Carlos Nepomuceno <carlosnepomuceno@outlook.com> - 2013-05-28 23:48 +0300
RE: Python #ifdef Fábio Santos <fabiosantosart@gmail.com> - 2013-05-28 23:51 +0100
RE: Python #ifdef Benjamin Kaplan <benjamin.kaplan@case.edu> - 2013-05-28 13:14 -0700
csiph-web