-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
delattr: use python code to add back missing builtin from cpython? #1251
Comments
The presence or absence of |
checking out: py/modbuiltins.c |
I think I am missing a good bit of how cp is organised. |
The presence of
We could control that instead with a new |
Or maybe we should just remove the |
Mr. Hablert, (Dan or Mr.Halbert)as more of a user than developer, hopefully just for nowcrosses fingers, I did find it is confusing that three are included yet the other isn't |
@TG-Techie Do you have a link to your code? I'm surprised you need to use the attr functions directly. |
What do we want done here? |
Is |
Nope, it looks like it's tied to FULL_BUILD. There isn't really anything to do for this specific issue. Do we want to have a new issue to enable CPYTHON_COMPAT on all boards? |
dear developers,
I am a huge fan of cp and am loving using it!
please hear me out:
was making a program loader and bufferer for my gui/user_thing by making classes and after asking around why I was having a problem Dan Halbert pointed out that delattr isn't in cp.
however with Mr.Halbert's help and a pile of dead bugs, I mean debugs :-), I found this works:
def delattr(target,name): exec('del str_target.'+name, {'str_target':target})
and am using it
and if you check the cpython page about builtin functions it says:
"For example, delattr(x, 'foobar') is equivalent to del x.foobar."
see: https://docs.python.org/3/library/functions.html#delattr
I would love to investigate implementing this at a c level or a python level!? (if small size # of bytes)
is that "kosher" to ask to do?
if it is okay for my to try this can i ask where the builtins are? I looked through repo but could not find it. in tools? (also tried finding getattr, search did not yield its location)
thanks for considering it!,
~TG-Techie
The text was updated successfully, but these errors were encountered: