Skip to content

A pm.new and other helpers #146

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Jul 28, 2023
Merged

A pm.new and other helpers #146

merged 6 commits into from
Jul 28, 2023

Conversation

wesgarland
Copy link
Collaborator

  • basically everything in an "empty" global (like Array, WebAssembly, Uint8Array, escape, Date, etc) is now an export of pythonmonkey
  • new and typeof operators are wrapped in functions for pythonic use
>>> import pythonmonkey as pm
>>> a=pm.new(pm.Uint8Array)([3,4,5])
>>> a
<memory at 0x7fe4415e93c0>

@Xmader Xmader self-requested a review July 25, 2023 00:57
@Xmader Xmader added this to the v0.2.1 milestone Jul 25, 2023
@Xmader Xmader linked an issue Jul 26, 2023 that may be closed by this pull request
Copy link
Collaborator

@zollqir zollqir left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@zollqir zollqir merged commit 05309d4 into main Jul 28, 2023
@zollqir zollqir deleted the feature/pm-new-bug-144 branch July 28, 2023 14:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Instantiate JS objects more easily (pm.new?)
3 participants