Commit 8eb3fd2b authored by Stefan Behnel's avatar Stefan Behnel Committed by GitHub

Merge pull request #2682 from bweigel/2634_embedsignature

Fix Memviewslice docstrings & Test
parents 53e4e77b d3f6eaa3
...@@ -653,8 +653,9 @@ class MemoryViewSliceType(PyrexType): ...@@ -653,8 +653,9 @@ class MemoryViewSliceType(PyrexType):
assert not pyrex assert not pyrex
assert not dll_linkage assert not dll_linkage
from . import MemoryView from . import MemoryView
base_code = str(self) if for_display else MemoryView.memviewslice_cname
return self.base_declaration_code( return self.base_declaration_code(
MemoryView.memviewslice_cname, base_code,
entity_code) entity_code)
def attributes_known(self): def attributes_known(self):
......
...@@ -428,6 +428,7 @@ cdef class Foo: ...@@ -428,6 +428,7 @@ cdef class Foo:
def m28(self, a: list(range(3))[::1]): pass def m28(self, a: list(range(3))[::1]): pass
def m29(self, a: list(range(3))[0:1:1]): pass def m29(self, a: list(range(3))[0:1:1]): pass
def m30(self, a: list(range(3))[7, 3:2:1, ...]): pass def m30(self, a: list(range(3))[7, 3:2:1, ...]): pass
def m31(self, double[::1] a): pass
__doc__ += ur""" __doc__ += ur"""
>>> print(Foo.m00.__doc__) >>> print(Foo.m00.__doc__)
...@@ -522,4 +523,7 @@ Foo.m29(self, a: list(range(3))[0:1:1]) ...@@ -522,4 +523,7 @@ Foo.m29(self, a: list(range(3))[0:1:1])
>>> print(Foo.m30.__doc__) >>> print(Foo.m30.__doc__)
Foo.m30(self, a: list(range(3))[7, 3:2:1, ...]) Foo.m30(self, a: list(range(3))[7, 3:2:1, ...])
>>> print(Foo.m31.__doc__)
Foo.m31(self, double[::1] a)
""" """
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment