Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes
asdl.Field Class Reference
Inheritance diagram for asdl.Field:
Inheritance graph
[legend]
Collaboration diagram for asdl.Field:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def __repr__

Public Attributes

 type
 name
 seq
 opt
_PyObject_HEAD_EXTRA Py_ssize_t ob_refcnt
struct _typeobjectob_type

Detailed Description

Definition at line 276 of file asdl.py.


Constructor & Destructor Documentation

def asdl.Field.__init__ (   self,
  type,
  name = None,
  seq = False,
  opt = False 
)

Definition at line 277 of file asdl.py.

00277 
00278     def __init__(self, type, name=None, seq=False, opt=False):
00279         self.type = type
00280         self.name = name
00281         self.seq = seq
00282         self.opt = opt

Here is the caller graph for this function:


Member Function Documentation

def asdl.Field.__repr__ (   self)

Definition at line 283 of file asdl.py.

00283 
00284     def __repr__(self):
00285         if self.seq:
00286             extra = ", seq=True"
00287         elif self.opt:
00288             extra = ", opt=True"
00289         else:
00290             extra = ""
00291         if self.name is None:
00292             return "Field(%s%s)" % (self.type, extra)
00293         else:
00294             return "Field(%s, %s%s)" % (self.type, self.name, extra)


Member Data Documentation

Definition at line 279 of file asdl.py.

Definition at line 107 of file object.h.

struct _typeobject* _object::ob_type [inherited]

Definition at line 108 of file object.h.

Definition at line 281 of file asdl.py.

Definition at line 280 of file asdl.py.

Definition at line 278 of file asdl.py.


The documentation for this class was generated from the following file: