Re: [Pyparsing] Proposed notational shortcut for setResultsName
Brought to you by:
ptmcg
From: Ralph C. <ra...@in...> - 2007-05-25 11:12:13
|
Hi Paul, > I don't want this to be part of the constructor. OK, I see your point. > Please don't focus on the fact that [] is implemented using > __getitem__, or that [] implies that we are "getting" anything I was just trying to point out that overloading should try and stick to similar meanings. People used to reading Python have a brain that's hard wired to think [] is indexing for a read, just like they think + is for adding, focused on it or not. What did you think of the realNum._('min') idea? Only two more characters and what it does looks like how it reads, i.e. it's calling an attribute function. I can read the bracket notation, I just think it would muddy the Pythoness of PyParsing. Cheers, Ralph. |