summaryrefslogtreecommitdiff
path: root/tests/run/builtin_types_none_T166.pyx
blob: 276f527245eb2d68ab791413f8bdff602c5342f3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# ticket: t166

__doc__ = u"""
>>> l = None
>>> l.append(2)
Traceback (most recent call last):
AttributeError: 'NoneType' object has no attribute 'append'

"""

def append_to_none():
    """
    >>> append_to_none()
    Traceback (most recent call last):
    AttributeError: 'NoneType' object has no attribute 'append'
    """
    cdef list l = None
    l.append(2)