Hacker News new | past | comments | ask | show | jobs | submit login

"Should array indexes begin at 0 or 1? My compromise of 0.5 was rejected without, I thought, proper consideration"

-- Stan Kelly-Bootle




There is Compromise, a Python library supporting this

    >>> l = HalfIndexList('abcde')
    >>> l[0.5]
    'a'
and other similar crazy ideas, like SemiMutable data types, which only change value if you try to set them a few times.

https://github.com/travisjungroth/Compromise

Introduced in this short 2016 talk https://youtu.be/yC9m2GInXqU?t=337


He's a fascinating guy too. I learned on hn recently he lived a parallel life as a mildly popular musician and football (soccer) manager.




Consider applying for YC's Spring batch! Applications are open till Feb 11.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: