Message5990
> 1) Obviously objects of these types are no longer hashable as such and thus
> will really screw things up if they're placed in a Map. You may want to
> change their hashCode to be on their object identity, or throw a TypeError,
> like PyList.
>
Excellent advice. Your intuition is right, that this is a peculiar use case.
It would be bizarre for a processing user to use, say, the current mouse x
position in pixels as a dictionary key.
Devil's advocate: given your legitimate concern that PyInteger and its kin
represent immutable values, why isn't "value" immutable?
Finally, I should say that given how idiosyncratic my use case is, I
wouldn't have any hard feelings if the committers thought it best to go back
to direct field access on an i
> 2) Normally you should consider making the underlying fields volatile.
>
Will do.
> Also, the current field in PyString is string, so should it be getValue or
> getString? I tend to favor the latter form this moment.
>
I'd argue for the former for some sort of "least surprise" aesthetic
relative to the other PyThings, but I'm very new to the project, and
wouldn't want to argue strongly for anything!
Very kind regards,
--
Jonathan Feinberg jdf@pobox.com http://MrFeinberg.com/ |
File name |
Uploaded |
unnamed
|
JonathanFeinberg,
2010-08-18.14:36:56
|
|
Date |
User |
Action |
Args |
2010-08-18 14:36:58 | JonathanFeinberg | set | recipients:
+ JonathanFeinberg, zyasoft |
2010-08-18 14:36:58 | JonathanFeinberg | link | issue1645 messages |
2010-08-18 14:36:57 | JonathanFeinberg | create | |
|