Re: [Python-Dev] Dicts are broken Was: unicode hell/mixing str andunicode asdictionarykeys
Bob Ippolito <[EMAIL PROTECTED]> wrote:
>>> Well it's not recomended to mix strings and unicode in the
>>> dictionaries
>>> but if we mix for example integer and float we have the same
>>> thing. It
>>> doesn't raise exception but still it is not expected behavior for
>>> me:
>> d = { 1.0: 10, 2.0: 20 }
>>> then if i somewhere later do:
>> d[1] = 100
>> d[2] = 200
>>> to have here all floats in d.keys(). May be this is not a best
>>> example.
>>
>> There is a strong difference. Python is moving towards unifying
>> number types in
>> a way (see the true division issue): the idea is that, all in all,
>> user
>> shouldn't really care what type a number is, as long as he knows
>> it's a number.
>> On the other hand, unicode and str are going to diverge more and
>> more.
>
> Well, not really. True division makes int/int return float instead of
> an int. You really do have to care if you have an int or a float most
> of the time, they're very different semantically.
Then I'd ask why Python goes through hoops to make sure that hash(1.0) ==
hash(1), in the first place.
Giovanni Bajo
___
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] More tracker demos online
> > > > Currently, we have two running tracker demos online: > > > > > > > > Roundup: > > > > http://efod.se/python-tracker/ > > > > > > > > Jira: > > > > http://jira.python.atlassian.com/secure/Dashboard.jspa > > > Is anyone looking at the Google Code Hosting tracker, just for fun? =) ( > code.google.com/hosting, although performance seems to be an issue for now) It's propietary code, isn't it? http://code.google.com/hosting/faq.html#itselfoss (Is that why you said "just for fun"?) Regards, -H. ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] More tracker demos online
On Aug 5, 2006, at 4:52 AM, Hernan M Foffani wrote: > Currently, we have two running tracker demos online: > > Roundup: > http://efod.se/python-tracker/ > > Jira: > http://jira.python.atlassian.com/secure/Dashboard.jspa >> >> >> Is anyone looking at the Google Code Hosting tracker, just for >> fun? =) ( >> code.google.com/hosting, although performance seems to be an issue >> for now) > > It's propietary code, isn't it? > http://code.google.com/hosting/faq.html#itselfoss > (Is that why you said "just for fun"?) So is Jira... -bob ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
