This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from redbaron import RedBaron | |
def main(): | |
input = open('input_test.py', 'rb') # test file: https://gist.github.com/b5y/d3bc895ebe1ecc06b522071dfa1cf840 | |
red = RedBaron(input.read()) | |
assignments = red.find_all('AssignmentNode') | |
for ind, body_line in enumerate(assignments.data): | |
print body_line.second_formatting[0].value |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
q = 3 | |
t = \ | |
6 | |
f = q\ | |
&t | |
p = q| t | |
h = f ^ t | |
a = \ | |
2 | |
b = 100 |