Download this file
25 lines (18 with data), 485 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25 | <?php
trait lang_python_resolve {
public static function python_resolve_atom($expr) {
if (is_object($expr)) {
if (isset(static::$names[$expr->name])) {
return $expr->name;
} else {
throw new Exception("NameError: name '{$expr->name}' is not defined");
}
}
return $expr;
}
public static function python_resolve_atom_trailers($atom,$trailers) {
if (!$trailers) {
return static::python_resolve_atom($atom);
}
}
}
|
×
Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.