New submission from samwyse <samw...@gmail.com>:

I'm using a class as a decorator, and saving information in a class variable.  
I wanted to access the information via a __getitem__ class method, but using 
conventional syntax doesn't work on a class.  The following exception is thrown 
when the attached script is run.

Traceback (most recent call last):
  File "/Users/sam/Documents/forth.py", line 34, in <module>
    print Alias["f'"]
TypeError: 'type' object has no attribute '__getitem__'

----------
components: None
files: 20120607.py
messages: 164926
nosy: samwyse
priority: normal
severity: normal
status: open
title: Adding __getitem__ as a class method doesn't work as expected
type: behavior
versions: Python 2.7
Added file: http://bugs.python.org/file26309/20120607.py

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue15289>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to