#NEWLINE# def __getitem__( self , key ) : #NEWLINE# #INDENT# key = key . lower ( ) #NEWLINE# try : #NEWLINE# #INDENT# return BASE_DATA_TYPES_REVERSE [ key ] #NEWLINE# #UNINDENT# except KeyError : #NEWLINE# #INDENT# import re #NEWLINE# m = re . search ( '^\\s*(?:var)?char\\s*\\(\\s*(\\d+)\\s*\\)\\s*$' , key ) #NEWLINE# if m : #NEWLINE# #INDENT# return ( 'CharField' , { #NEWLINE# #INDENT# 'maxlength' : int ( m . group ( 1 ) ) , #NEWLINE# #UNINDENT# } ) #NEWLINE# #UNINDENT# raise KeyError