if self.doc and Options.docstrings:
scope.doc = embed_position(self.pos, self.doc)
- if has_body and not self.in_pxd:
- # transforms not yet run on pxd files
- from ParseTreeTransforms import AnalyseDeclarationsTransform
- transform = AnalyseDeclarationsTransform(None)
- for entry in scope.var_entries:
- if hasattr(entry, 'needs_property'):
- property = transform.create_Property(entry)
- self.body.stats.append(property)
-
if has_body:
self.body.analyse_declarations(scope)
if self.in_pxd:
>>> s.e is s
True
>>> s.e = None
+
+ >>> s = Bot()
+ >>> s.e = s
+ >>> s.e = 1
+ Traceback (most recent call last):
+ TypeError: Cannot convert int to extmember.Bot
+ >>> s.e is s
+ True
+ >>> s.e = None
"""
+# declared in the pxd
cdef class Spam:
- cdef public Spam e
+ pass
+
+# not declared in the pxd
+cdef class Bot:
+ cdef public Bot e