Path: csiph.com!usenet.pasdenom.info!gegeweb.org!usenet-fr.net!nerim.net!novso.com!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.022 X-Spam-Evidence: '*H*': 0.96; '*S*': 0.00; 'subject:Python': 0.06; 'differently': 0.07; 'assumed': 0.09; 'python': 0.11; 'language,': 0.12; 'language.': 0.14; 'thread': 0.14; '#ifdef': 0.16; 'do!': 0.16; 'expend': 0.16; 'illustrate': 0.16; 'opposite': 0.16; 'pythonic': 0.16; 'received:65.55.116.7': 0.16; 'surprising': 0.16; 'underlying': 0.16; 'version).': 0.16; 'whatever,': 0.16; 'language': 0.16; 'trying': 0.19; 'example': 0.22; 'programming': 0.22; '+0000': 0.22; 'to:name:python-list@python.org': 0.22; 'received:65.55.116': 0.24; 'java': 0.24; 'question': 0.24; 'define': 0.26; 'asking': 0.27; 'header:In-Reply-To:1': 0.27; 'function': 0.29; 'skip:- 40': 0.29; "i'm": 0.30; '(which': 0.31; 'asked': 0.31; 'usually': 0.31; 'perl': 0.31; 'python"': 0.31; 'figure': 0.32; 'languages': 0.32; 'another': 0.32; 'actual': 0.34; 'date:': 0.34; 'problem': 0.35; "can't": 0.35; 'knows': 0.35; 'but': 0.35; 'there': 0.35; 'doing': 0.36; 'list': 0.37; 'email addr:python.org': 0.37; 'sometimes': 0.38; 'solving': 0.38; 'to:addr:python-list': 0.38; 'subject:': 0.39; 'to:addr:python.org': 0.39; 'how': 0.40; 'even': 0.60; 'skip:u 10': 0.60; 'everybody': 0.60; 'solve': 0.60; 'new': 0.61; "you're": 0.61; 're:': 0.63; 'myself': 0.63; 'email name:python- list': 0.65; 'here': 0.66; 'subject.': 0.74; 'right!': 0.84; '"how': 0.91; 'edwards': 0.91; 'hate': 0.91; 'subject: #': 0.96; '2013': 0.98 X-TMN: [aDdPJQNcpsmwAZV8ANpRWusHhq0FcuCj] X-Originating-Email: [carlosnepomuceno@outlook.com] From: Carlos Nepomuceno To: "python-list@python.org" Subject: RE: Python #ifdef Date: Tue, 28 May 2013 23:54:46 +0300 Importance: Normal In-Reply-To: References: , , , , , , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-OriginalArrivalTime: 28 May 2013 20:54:47.0297 (UTC) FILETIME=[969F1710:01CE5BE5] X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 50 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1369774488 news.xs4all.nl 15956 [2001:888:2000:d::a6]:33231 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:46341 ----------------------------------------=0A= > From: invalid@invalid.invalid=0A= > Subject: Re: Python #ifdef=0A= > Date: Tue=2C 28 May 2013 20:42:34 +0000=0A= > To: python-list@python.org=0A= [...]=0A= > Here's the important lesson from this thread:=0A= >=0A= > Instead of asking "how do I write X in Python" where yoy've assumed X=0A= > is the solution to your problem=2C you're usually better off asking how= =0A= > to solve the underlying problem in a Pythonic way.=0A= >=0A= > IOW=2C instead of asking about a Python preprocessor (which you have=0A= > assumed is the solution to the problem because that's how you would do=0A= > it in C)=2C ask about the actual problem (how to define a function=0A= > differently depending on Python version).=0A= >=0A= > People on this list are very inventive and will expend a surprising=0A= > amount of time to figure out often too-clever ways to do X because you=0A= > asked how to do X -- even if doing X is a lousy way to solve your=0A= > actual problem...=0A= >=0A= > When asking how do I solve a problem=2C it's OK to illustrate that=0A= > question with an example X of how you would solve it in C or Java or=0A= > Ruby or Perl or whatever=2C but remember=0A= >=0A= > 1) Not everybody here knows C or Java or Ruby or Perl or whatever=2C=0A= > and the person who _does_ know everyting there is to know about=0A= > solving some particular underlying problem isn't going to go=0A= > learn a new language so that they can understand your example and=0A= > figure out what you're trying to accomplish.=0A= >=0A= > 2) Programming languages differ. X may be the best way to solve the=0A= > problem in one language=2C but it might be an awful way to do it in=0A= > another language.=0A= >=0A= > --=0A= > Grant Edwards grant.b.edwards Yow! I'm ANN LANDERS!!=0A= > at I can SHOPLIFT!!=0A= > gmail.com=0A= =0A= =0A= You're right! Sometimes I hate myself for doing exactly the opposite of wha= t I would like to do!=0A= =0A= Unfortunately I can't change the thread subject.=0A= =0A= How do you have "invalid@invalid.invalid" instead of your email address? = =