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

Complete implementations of Python builtins #47

Open
freakboy3742 opened this issue Apr 13, 2016 · 40 comments
Open

Complete implementations of Python builtins #47

freakboy3742 opened this issue Apr 13, 2016 · 40 comments

Comments

@freakboy3742
Copy link
Member

batavia/core/builtins.js is an implementation of all the Python builtins - methods like print(), input(), list(), abs(), min() and so on.

An implementation of these builtins is required.

@schuyler1d
Copy link
Contributor

i'm going to implement filter()

@jasonwalsh
Copy link

I'm going to work on reversed() 💥

@lisroach
Copy link

lisroach commented Jun 2, 2016

I will implement list()

@schuyler1d
Copy link
Contributor

also doing map()

@ghost
Copy link

ghost commented Jun 2, 2016

I'm going to work on len()

@raehart
Copy link
Contributor

raehart commented Jun 4, 2016

Going to work on this issue, is there any particular method that is needed ASAP? otherwise I'll pick one and post.

@ghost
Copy link

ghost commented Jun 4, 2016

working on set()

@Lawlheart
Copy link
Contributor

working on oct()

@Lawlheart
Copy link
Contributor

working on all()

@raehart
Copy link
Contributor

raehart commented Jun 5, 2016

working on isinstance()

@prathmesh4
Copy link

I m work beginning

@asher-scott
Copy link
Contributor

Which builtins have yet to be implemented?

@freakboy3742
Copy link
Member Author

freakboy3742 commented Jul 6, 2016

@asherscott At the very least, the methods in this file whose implementation is nothing more than throw NotImplmentedError. There are a couple of methods that internally throw NotImplementedError as well, for certain subsets of behavior (e.g., iter with 2 arguments).

@greeve
Copy link
Contributor

greeve commented Jul 21, 2016

I am working on implementing ascii in batavia/core/builtins.js.

@candeira
Copy link
Contributor

I'm dibbing byte, bytearray, and adding to Byte and Bytearray, which depend on each other enough that it doesn't make sense to work on one and not the others.

I've opened a (so far) empty PR to track progress of my work: #221

swenson added a commit to swenson/batavia that referenced this issue Aug 15, 2016
This helps with beeware#47, as I am a
first-timer!

There are still some issues with very large arguments, but
I can file a separate bug for that, assuming it is not already known.
swenson added a commit to swenson/batavia that referenced this issue Aug 15, 2016
This helps with beeware#47, as I am a
first-timer!

There are still some issues with very large arguments, but
I can file a separate bug for that, assuming it is not already known.
@candeira
Copy link
Contributor

Progressing on bytes by vendoring the Buffer JS library, stalled on bytearray because Buffer is mutable, but fixed-length. I'll keep reporting.

@ghost
Copy link

ghost commented Sep 14, 2016

Hey @freakboy3742 the link in this (#47 (comment)) points to 404 error page.

@freakboy3742
Copy link
Member Author

@shyam114 Thanks - I've just corrected the link.

@vojtechjelinek
Copy link
Contributor

Working on max() and min()

@candeira
Copy link
Contributor

Dibbing str(). Currently batavia has implemented the Python2 version of str(), and we want the Python3 version. Taking it over because it fits neatly with the work I'm doing in bytes().

@greeve
Copy link
Contributor

greeve commented Nov 13, 2016

Sorry for the delayed response. I started but didn't finish implementing
ascii. Go ahead with yours.

Thanks,
Greg

On Sat, Nov 5, 2016 at 8:20 AM, Daniel Rios [email protected]
wrote:

@greeve https://github.com/greeve hey- are you still working on ascii?
I've also started work on it, not realizing you had claimed it already.


You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
#47 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AFl-IEZrHDT4yHr5B6HF-0la_UQ5yGhtks5q7JCkgaJpZM4IGM-e
.

@shaib shaib mentioned this issue Nov 30, 2016
@jwpfox
Copy link

jwpfox commented Dec 27, 2016

I think the new link for this (#47 (comment)) is here. Appears to have been moved in the last month or so.

@matthewphillips
Copy link

Hi. First time contributor. I was looking for a function to work on implementing, but the previous link provided by @freakboy3742 no longer exists. Is there a list of functions currently up for grabs?

@freakboy3742
Copy link
Member Author

@matthewphillips The builtins are no longer in a single file; this directory contains all the builtins. If you search the files in that directory for "throw new exceptions.NotImplementedError" you'll get the list of stuff that is outstanding.

@robcarney
Copy link
Contributor

Going to work on bytearray and bytes constructor overloads with int arguments.

@gobisa
Copy link
Contributor

gobisa commented Mar 29, 2018

Is this still active? I would like to work on reversed() and sorted().

@swenson
Copy link
Contributor

swenson commented Mar 29, 2018

I think that reversed() and sorted() are already implemented:
https://github.com/pybee/batavia/blob/master/batavia/builtins/sorted.js
https://github.com/pybee/batavia/blob/master/batavia/builtins/reversed.js

Not that they couldn't be improved.

@marcus290
Copy link
Contributor

Hi there, working on issubclass()

@nicklambourne
Copy link
Contributor

I'm going to try and sort out the final test cases for float().

@alamastor
Copy link

I thought I'd have a go at implementing dir(), but because of implementation differences between Batavia and CPython it doesn't seem like their output should match, e.g. in CPython bool inherits from int, but in Batavia it inherits from object. This means most of the tests that compare output with CPython are going fail.

Is this worth doing, or should I work on something else? Is there something else I could test against?

@KlebGomes
Copy link

Hello. I'm a first timer and how could I help with this issue? What I need to do? I'm a bit lost here. hehe
I want to help and learn more and more about Python and program to develop my skills with experienced persons!

Thanks everyone!

@freakboy3742
Copy link
Member Author

@KlebGomes Hi! Our guide for first time contributors is here - that might provide some more context, and a guide for your first contribution. If you've already read that, or you've got more specific questions, let us know!

@vishal3410
Copy link

vishal3410 commented Feb 16, 2019

Hii can i work on vars()

@zimmah
Copy link
Contributor

zimmah commented Apr 8, 2019

Is there a list of methods that are still open?

@freakboy3742
Copy link
Member Author

@zimmah There isn't a list being manually maintained. There's two ways to check for methods still waiting on an implementation.

  1. Check for a "NotImplemented" exception in the method implmentation in Batavia; and
  2. Look at the tests, and see how substantial they are. The methods that are still waiting on an implementation (or partial implementations) will have very bare bones testing (if any at all).

@staujd02
Copy link
Contributor

I did some preliminary work on the format() function, specifically for the Bool type -- #816

@gregcowell
Copy link
Contributor

I am working on staticmethod()

@gregcowell
Copy link
Contributor

I've submitted a PR for staticmethod()

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests