The current PerlHash PMC coerces keys to strings, so the following will print bar:
my %hash; $hash{1} = 'foo'; $hash{"1"} = 'bar'; print $hash{1};
Whereas the nearest equivalent in Python will print foo:
dict = {} dict[1] = 'foo' dict["1"] = 'bar' print dict[1]
For Python support, it would be ideal if there would be a hash method entry in the VTABLE for each object.
- Sam Ruby