Skip to content
This repository was archived by the owner on May 31, 2020. It is now read-only.
This repository was archived by the owner on May 31, 2020. It is now read-only.

type(tuple) not working properly #822

Description

@dmoisset

Expected Behavior

type(tuple) returns an incorrect value

Current Behavior

When I try this on master, this returns the javascript function with the Tuple constructor. I expect this to return the type object.

Steps to reproduce

For reference, this is what cpython does:

>>> print(type(tuple))
<class 'type'>
>>> print(type(tuple) is type)
True

while batavia does the following

>>> print(type(tuple))
function (args, kwargs) {
  if (args.length === 0) {
    return new types.Tuple();
  }

  return new types.Tuple(args[0]);
}
>>> print(type(tuple) is type)
False

Your Environment

Testing on master, revision 71388f5

  • Python Version 3.6.8

  • Operating System and Version: Ubuntu 18.04

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions