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


Groups > comp.lang.python > #65485

Re: Calculator Problem

From Peter Otten <__peter__@web.de>
Subject Re: Calculator Problem
Date 2014-02-05 19:15 +0100
Organization None
References <608a3384-525b-4879-82d2-5a6414827fa7@googlegroups.com> <ed1c2ddd-f704-4d58-a5a4-aef13de88817@googlegroups.com> <roy-4910C7.19535204022014@news.panix.com> <lcs79s$98d$1@dont-email.me> <CAN1F8qWAprrLg_mFe7mg3vVwwtRK+8r3_qZ3uWigh5uTZfcepA@mail.gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.6425.1391624165.18130.python-list@python.org> (permalink)

Show all headers | View raw


Joshua Landau wrote:

> On 5 February 2014 02:22, Dan Sommers <dan@tombstonezero.net> wrote:
> 
>> On Tue, 04 Feb 2014 19:53:52 -0500, Roy Smith wrote:
>>
>> > In article <ed1c2ddd-f704-4d58-a5a4-aef13de88817@googlegroups.com>,
>> >  David Hutto <dwightdhutto@gmail.com> wrote:
>> >
>> >> Can anyone point out how using an int as a var is possible
>> >
>> > one = 42
>> >
>> > (ducking and running)
>>
>> int = 42
>>
>> (ducking lower and running faster)
> 
> 
> globals()["1"] = 42
> 
> (limbo, limbo, limbo like me)

>>> import sys, ctypes
>>> ctypes.memmove(id(42), id(1), sys.getsizeof(42))
37657512
>>> 42
1

Hm...

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Calculator Problem Charlie Winn <charliewinn97@gmail.com> - 2014-02-02 13:16 -0800
  Re: Calculator Problem Alister <alister.ware@ntlworld.com> - 2014-02-02 21:39 +0000
  Re: Calculator Problem Gary Herron <gary.herron@islandtraining.com> - 2014-02-02 13:46 -0800
    Re: Calculator Problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-02 22:11 +0000
    Re: Calculator Problem Charlie Winn <charliewinn97@gmail.com> - 2014-02-03 10:04 -0800
      Re: Calculator Problem Joel Goldstick <joel.goldstick@gmail.com> - 2014-02-03 13:17 -0500
        Re: Calculator Problem Charlie Winn <charliewinn97@gmail.com> - 2014-02-03 10:25 -0800
          Re: Calculator Problem Denis McMahon <denismfmcmahon@gmail.com> - 2014-02-04 00:41 +0000
      Re: Calculator Problem Roy Smith <roy@panix.com> - 2014-02-03 13:26 -0500
      Re: Calculator Problem Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2014-02-03 22:24 +0000
        Re: Calculator Problem Ian Kelly <ian.g.kelly@gmail.com> - 2014-02-03 16:10 -0700
      Re: Calculator Problem Gary Herron <gary.herron@islandtraining.com> - 2014-02-03 15:06 -0800
  Re: Calculator Problem David Hutto <dwightdhutto@gmail.com> - 2014-02-04 07:43 -0800
    Re: Calculator Problem David Hutto <dwightdhutto@gmail.com> - 2014-02-04 10:54 -0500
    Re: Calculator Problem Roy Smith <roy@panix.com> - 2014-02-04 19:53 -0500
      Re: Calculator Problem Chris Angelico <rosuav@gmail.com> - 2014-02-05 12:09 +1100
      Re: Calculator Problem Dan Sommers <dan@tombstonezero.net> - 2014-02-05 02:22 +0000
        Re: Calculator Problem Joshua Landau <joshua@landau.ws> - 2014-02-05 18:03 +0000
        Re: Calculator Problem Peter Otten <__peter__@web.de> - 2014-02-05 19:15 +0100
  Re: Calculator Problem "Mario R. Osorio" <nimbiotics@gmail.com> - 2014-02-04 14:55 -0800
  Re: Calculator Problem 88888 Dihedral <dihedral88888@gmail.com> - 2014-02-05 10:30 -0800

csiph-web