Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #46341

RE: Python #ifdef

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 <carlosnepomuceno@outlook.com>
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 <carlosnepomuceno@outlook.com>
To "python-list@python.org" <python-list@python.org>
Subject RE: Python #ifdef
Date Tue, 28 May 2013 23:54:46 +0300
Importance Normal
In-Reply-To <ko34rq$m2s$1@reader1.panix.com>
References <ko34rq$m2s$1@reader1.panix.com>
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 <python-list.python.org>
List-Unsubscribe <http://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 <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2326.1369774488.3114.python-list@python.org> (permalink)
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

Show key headers only | View raw


----------------------------------------
> 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 | NextPrevious in thread | Next in thread | Find similar | Unroll thread


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