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


Groups > comp.lang.python > #46333

RE: Python #ifdef

Path csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!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.015
X-Spam-Evidence '*H*': 0.97; '*S*': 0.00; 'that?': 0.05; 'subject:Python': 0.06; 'runs': 0.10; 'python': 0.11; 'def': 0.12; '2.7': 0.14; "'''": 0.16; 'to:name:python-list@python.org': 0.22; 'received:65.55.116': 0.24; 'header:In-Reply-To:1': 0.27; 'way?': 0.31; 'run': 0.32; 'there': 0.35; 'thank': 0.38; 'to:addr:python- list': 0.38; '\xa0\xa0\xa0': 0.39; 'to:addr:python.org': 0.39; 'skip:n 10': 0.64; 'subject: #': 0.96
X-TMN [WBifM9tYuK3QBGp+mQTOYYcQfy6Q+s2A]
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:07:39 +0300
Importance Normal
In-Reply-To <b0kgm4F3gs4U1@mid.individual.net>
References <b0kgm4F3gs4U1@mid.individual.net>
Content-Type text/plain; charset="iso-8859-1"
Content-Transfer-Encoding quoted-printable
MIME-Version 1.0
X-OriginalArrivalTime 28 May 2013 20:07:39.0517 (UTC) FILETIME=[01221AD0:01CE5BDF]
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.2320.1369771667.3114.python-list@python.org> (permalink)
Lines 16
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1369771667 news.xs4all.nl 15866 [2001:888:2000:d::a6]:60021
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:46333

Show key headers only | View raw


Thank you! I made it run like the following. What do you think about that? IS there a better way?



#The following runs on Python 2.7
sc3='''
# Python 3
def original(n):
    m = 0
    for b in n.to_bytes(6, 'big'):
        m = 256*m + b
    return m
'''
if sys.version_info[0] == 3:
    exec(sc3) 		 	   		  

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