[Pythonmac-SIG] NSTableView and NSOutlineView backgrounds

Ronald Oussoren oussoren at cistron.nl
Wed Oct 15 06:35:33 EDT 2003

On 15 okt 2003, at 11:49, Jack Jansen wrote:
>> Along these lines, has anyone ever 'hacked' the python interpreter to 
>> do smalltalk like messaging, with segmented names? I've been tempted 
>> to try it myself. You wouldn't think it would be that hard. Maybe 
>> just an extra stage to convert segmented names to underscored ones, 
>> the same way that PyObjC names methods. But I'm no python expert, so 
>> I don't know what would be involved.
> I've been thinking about it. And the nice thing is that "[" cannot 
> currently
> occur as the start symbol for an expression, and I think a NAME after 
> an
> expression is also safe, so adding rules like
> 	atom: '[' test methodarg* ']'
> 	methodarg: NAME ':' test
> should work...

I'm probably very dense, but isn't '[' the start of a list literal or 
list comprehension and therefore a valid start of an expression or 
statement?.  Using angled brackets might work, but would introduce 

	<NSPoint pointWithX:x andY:y>	# This works fine
	<NSBool boolWithValue: x>y>		# Oops

Compound brackets might work, e.g. [@NSPoint pointWithX:x andY:y @], 
but are pretty ugly.

> But getting Guido to incorporate this into the language is a different 
> story:-)

This would be a pretty cool hack, and it would solve the major 
aesthetic problem of PyObjC: the ugly method names.


More information about the Pythonmac-SIG mailing list