예를 들어 시리즈를 생성하는 생성기가 있습니다.
def triangle_nums():
    '''Generates a series of triangle numbers'''
    tn = 0
    counter = 1
    while True:
        tn += counter
        yield tn
        counter += + 1
파이썬 2에서는 다음과 같은 호출을 할 수 있습니다.
g = triangle_nums()  # get the generator
g.next()             # get the next value
그러나 파이썬 3에서는 동일한 두 줄의 코드를 실행하면 다음 오류가 발생합니다.
AttributeError: 'generator' object has no attribute 'next'
그러나 루프 반복기 구문은 Python 3에서 작동합니다.
for n in triangle_nums():
    if not exit_cond:
       do_something()...
파이썬 3의 동작의 차이점을 설명하는 것을 아직 찾을 수 없었습니다.
