Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
why is range() int only
#4
the indexing use case being so dominant does not rule out other use cases. but a concise efficient implementation in C might be the reason. it does type check, and other checks. if it is in C then a type check is probably essential to avoid memory corruption that C is infamous for. i played around with implementing my own. it does reverse decrements, too. i have only tested floats. but it looks like numpy will be in my float use case. or i might scale the ints.
Tradition is peer pressure from dead people

What do you call someone who speaks three languages? Trilingual. Two languages? Bilingual. One language? American.
Reply


Messages In This Thread
why is range() int only - by Skaperen - Nov-09-2021, 04:20 AM
RE: why is range() int only - by Gribouillis - Nov-09-2021, 10:21 AM
RE: why is range() int only - by DeaD_EyE - Nov-09-2021, 12:20 PM
RE: why is range() int only - by Skaperen - Nov-10-2021, 01:19 AM

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020