Skip to content

[jit] Python built-in function support #18627

@driazati

Description

@driazati

We support many built-in functions (Python 2, Python 3), but not all of them. Some of these need some more discussion (i.e. what about builtins that exist in Python 2 but not 3 and vice versa), but many can be done piecemeal and should be straightforward to implement. When you implement a builtin please check to see if it is a magic method.

To do

  • abs()
  • all()
  • any()
  • bin()
  • bool()
  • bytearray()
  • chr()
  • dict()
  • divmod()
  • enumerate()
  • float()
  • getattr()
  • hash()
  • hex()
  • int()
  • isinstance()
  • len()
  • list()
  • long() (long is deprecated in py3 builtins)
  • max()
  • min()
  • oct()
  • ord()
  • pow()
  • print()
  • range()
  • reversed()
  • round()
  • set()
  • slice()
  • sorted() (separate issue, implemented for lists)
  • str()
  • sum()
  • type()

Maybe to do later (when things like first class modules are in, or if we ever have something like iterators)

  • callable()
  • tuple()
  • complex()
  • delattr()
  • filter()
  • format()
  • frozenset()
  • globals()
  • hasattr()
  • issubclass()
  • iter()
  • locals()
  • next()
  • object()
  • property()
  • reduce()
  • setattr()
  • repr()
  • super()
  • vars()
  • zip()

Probably won't do

  • __import__()
  • basestring()
  • classmethod()
  • cmp()
  • compile()
  • dir()
  • eval()
  • execfile()
  • file()
  • help()
  • id()
  • input()
  • map()
  • memoryview()
  • open()
  • raw_input()
  • reload()
  • staticmethod()
  • unichr()
  • unicode()
  • xrange()

cc @suo

Metadata

Metadata

Assignees

No one assigned

    Labels

    jit-backlogoncall: jitAdd this issue/PR to JIT oncall triage queuetriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions