- Python Home
- About
- News
- Documentation
- Downloads
- Community
- Foundation
- Developer's Guide
- Issue Tracker
- Issues
- Summaries
- User
- Administration
- Help
➜
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2018-12-19 14:54 by Никита Сиргиенко, last changed 2022-04-11 14:59 by admin.
| Messages (3) | ||
|---|---|---|
| msg332144 - (view) | Author: Никита Сиргиенко (Никита Сиргиенко) | Date: 2018-12-19 14:54 |
System:
Distributor ID: Ubuntu
Description: Ubuntu 18.04.1 LTS
Release: 18.04
Codename: bionic
Arch: x86_64
Compilier:
g++ (Ubuntu 7.3.0-27ubuntu1~18.04) 7.3.0
Python versions:
Python 3.6.7-1
Python 2.7.15rc1
Description:
This C++ code:
PyObject* pBuiltin = PyImport_ImportModule("builtins");
PyObject* py_globals_fun = PyObject_GetAttrString(pBuiltin,"locals");
PyObject* globals = PyObject_CallObject(py_globals_fun, NULL);
produces "SystemError: frame does not exist".
For function "globals" output is "SystemError: returned NULL without
setting an error". For python2 this code produces similar errors (descriptions
of error little different).
Another functions with arguments, like "abs", works fine.
And calling function with optional argument, like "int", "float"
works with this code (with null parameter) without problem.
|
||
| msg332175 - (view) | Author: Benjamin Peterson (benjamin.peterson) * ![]() |
Date: 2018-12-20 05:41 |
What behavior are you expecting? If there isn't any Python code in the callback, globals() and locals() are meaningless. |
||
| msg332178 - (view) | Author: Никита Сиргиенко (Никита Сиргиенко) | Date: 2018-12-20 06:03 |
I run some Python code before this moment, so I expect, that globals variable will be a PyDictObject with results of 'globals()' command: '__name__', '__doc__', global variables, etc. |
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2022-04-11 14:59:09 | admin | set | github: 79717 |
| 2018-12-20 06:03:51 | Никита Сиргиенко | set | messages: + msg332178 |
| 2018-12-20 05:41:46 | benjamin.peterson | set | nosy:
+ benjamin.peterson messages: + msg332175 |
| 2018-12-19 14:54:20 | Никита Сиргиенко | create |
Powered by Roundup Copyright © 1990-2022, Python Software Foundation
Legal Statements

