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


Groups > comp.lang.python > #36354

Re: Over 30 types of variables available in python ?

References (1 earlier) <kcd5sg$dtq$1@ger.gmane.org> <mailman.209.1357548954.2939.python-list@python.org> <50ea9ac2$0$21851$c3e8da3$76491128@news.astraweb.com> <1357569153.3330.140661174432761.5D8246E9@webmail.messagingengine.com> <50EADF88.10605@davea.name>
Date 2013-01-08 01:59 +1100
Subject Re: Over 30 types of variables available in python ?
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.222.1357570801.2939.python-list@python.org> (permalink)

Show all headers | View raw


On Tue, Jan 8, 2013 at 1:45 AM, Dave Angel <d@davea.name> wrote:
> On 01/07/2013 09:32 AM, marduk wrote:
>> So I guess if one *really* wanted to compare C variables to Python
>> variables, you could say that all python variables are of type void*
>> except Python does all mallocs/frees and the casting for you.
>
> A better analogy would be to C++, and all names would be something like
> shared_ptr<object*>.  And (except for old-style classes) all actual data
> is of a type derived from object.

But yes, a C pointer variable is closest to a Python local, with
actual content always stored on the heap.

ChrisA

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


Thread

Re: Over 30 types of variables available in python ? chaouche yacine <yacinechaouche@yahoo.com> - 2013-01-07 00:53 -0800
  Re: Over 30 types of variables available in python ? Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-01-07 09:52 +0000
    Re: Over 30 types of variables available in python ? marduk <marduk@python.net> - 2013-01-07 09:32 -0500
    Re: Over 30 types of variables available in python ? Dave Angel <d@davea.name> - 2013-01-07 09:45 -0500
    Re: Over 30 types of variables available in python ? Chris Angelico <rosuav@gmail.com> - 2013-01-08 01:59 +1100
  Re: Over 30 types of variables available in python ? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-10 21:20 -0800
  Re: Over 30 types of variables available in python ? Rick Johnson <rantingrickjohnson@gmail.com> - 2013-01-10 21:20 -0800

csiph-web