473,385 Members | 1,409 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Representation of new-style instance

Consider a new-style class

class rabbit(object):
def __init__(self,c):
self.color = c


Which C struct in the Python implementation is used to represent the
instances c1 and c2 of the
new-style class? I understand that when the class 'rabbit' is
created, the type_new function
in typeobject.c creates a copy of a 'struct typeobject' with
dictionary tp_dict appropriately modified.

However, I can't figure out which structure is used for new-style
instances and where the instance dictionary is stored. Could anyone
please clarify?

Aug 1 '07 #1
1 899
Raj B wrote:
Which C struct in the Python implementation is used to represent
the instances c1 and c2 of the new-style class?
You don't try to send this raw over some stream connection, do you?


BOFH excuse #349:

Stray Alpha Particles from memory packaging caused Hard Memory Error
on Server.

Aug 2 '07 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

by: Mantorok Redgormor | last post by:
I always see posts that involve the representation of integers, where some poster claims that the unerlyding representation of an integer doesn't have to reflect on the actual integer, for example:...
by: pemo | last post by:
Ambiguous? I have a student who's asked me to explain the following std text (esp. the footnote). Certain object representations need not represent a value of the object type. If...
by: Carramba | last post by:
Hi! How can I output value of char or int in binary form with printf(); ? thanx in advance
by: OscarPiacenza | last post by:
Hello all. :) My name is Oscar and I’m a novice on XML and dataset arguments. I need some help to resolve (and understand :) ) the following problem: I have stored some data in a SqlServer...
by: anders.weitman | last post by:
Hi! I want to get the representation in memory of a variable of type double and put it in an array of four unsigned short int (I'm on a 32- bits Windows architecture so a double is 64-bits and...
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.