summaryrefslogtreecommitdiff
path: root/numpy/f2py/lib/parser/base_classes.py
diff options
context:
space:
mode:
authorPearu Peterson <pearu.peterson@gmail.com>2006-10-11 11:25:02 +0000
committerPearu Peterson <pearu.peterson@gmail.com>2006-10-11 11:25:02 +0000
commit92a25379d95b1b1448f41e601e08ab0239ea7181 (patch)
tree059661e7a497b9cda881acc94ed4779decb8496b /numpy/f2py/lib/parser/base_classes.py
parentc0f1f96067a7dd75f767068790c39e055a83e40b (diff)
downloadnumpy-92a25379d95b1b1448f41e601e08ab0239ea7181.tar.gz
F2PY G3: improved public/private spec handling. Added function wrapping support.
Diffstat (limited to 'numpy/f2py/lib/parser/base_classes.py')
-rw-r--r--numpy/f2py/lib/parser/base_classes.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/numpy/f2py/lib/parser/base_classes.py b/numpy/f2py/lib/parser/base_classes.py
index 9d633539e..ebce02108 100644
--- a/numpy/f2py/lib/parser/base_classes.py
+++ b/numpy/f2py/lib/parser/base_classes.py
@@ -170,6 +170,7 @@ class Variable:
'variable %r already has type %s,'\
' resetting to %s' \
% (self.name, self.typedecl.tostr(),typedecl.tostr()))
+ assert typedecl is not None
self.typedecl = typedecl
return
@@ -282,6 +283,7 @@ class Variable:
def is_pointer(self): return 'POINTER' in self.attributes
def is_array(self): return not not (self.bounds or self.dimension)
+ def is_scalar(self): return not self.is_array()
def update(self, *attrs):
attributes = self.attributes
@@ -334,7 +336,7 @@ class Variable:
if self.check:
a.append('CHECK(%s)' % (', '.join(self.check)))
if a:
- s += ', '.join(a) + ' :: '
+ s += ', ' + ', '.join(a) + ' :: '
s += self.name
if self.bounds:
s += '(%s)' % (', '.join(self.bounds))