Skip to content

[RFC] How compatible should we be with CPython? #1192

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

Open
windelbouwman opened this issue Jul 31, 2019 · 2 comments
Open

[RFC] How compatible should we be with CPython? #1192

windelbouwman opened this issue Jul 31, 2019 · 2 comments
Labels
C-compat A discrepancy between RustPython and CPython RFC Request for comments

Comments

@windelbouwman
Copy link
Contributor

Summary

How compatible should rustpython be with cpython?

Detailed Explanation

Currently we strive for pretty high compatibility with cpython. This is a difficult path. Maybe we can ease development by deliberately not implementing certain parts of python that might be weird in the first place.

Examples of things we could explicitly not implement:

  • Access to the __dict__ attribute. We could hide this, and implement in a simpler way.
  • The handling of the locals keyword. Also, the possibility to modify a local dictionary.
  • String glueing: "fu" "bar" == "fubar", a leftover from the C era, and error prone.

Background information about this topic:

Unresolved Questions

What should we leave out?

@windelbouwman windelbouwman added the RFC Request for comments label Jul 31, 2019
@palaviv
Copy link
Contributor

palaviv commented Aug 2, 2019

I would say that anything that is not documented in the CPython documentation can be changed without discussion. On any other deviation an issue should be opened and once accepted we will document the deviation.

Access to the dict attribute. We could hide this, and implement in a simpler way.

This is used in many places in the stdlib so I am not sure about this.

String glueing: "fu" "bar" == "fubar", a leftover from the C era, and error prone.

+1

@Evpok
Copy link

Evpok commented Aug 4, 2019

String glueing: "fu" "bar" == "fubar", a leftover from the C era, and error prone.

This is really useful for formatting long literal strings without taking a hit from using +.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-compat A discrepancy between RustPython and CPython RFC Request for comments
Projects
None yet
Development

No branches or pull requests

4 participants