#!/usr/local/bin/python2 def fizzbuzz(n): for i in range(1, n+1): if i % 15 == 0: yield 'FizzBuzz' elif i % 5 == 0: yield 'Buzz' elif i % 3 == 0: yield 'Fizz' else: yield i class C(tuple): def __new__(cls, a): return tuple.__new__(cls, (a,)) def __getitem__(self, i): raise TypeError @property def a(self): return tuple.__getitem__(self, 0) c = C(1) print c.a