Generates random python 3.6 scripts
Resources:
python3 randast.py
Don't forget to activate the virtualenv before running the program
pipenv shell
pipenv install
- Literals
- number
- string
- formatted value
- joined string
- bytes
- list
- tuple
- set
- dict
- ellipsis
-
True
,False
andNone
- Variables
- simple
- starred
- Expressions
- unary operations
- binary operations
- bool operations
- comparisons
- function call
- inline if expression
- attribute access
- index subscripting
- slice subscripting
- advanced slicing
- list comprehension
- set comprehension
- generator expression
- dict comprehension
- Statements
- assignment
- annotated assignment
- augmented assignment
- raise
- assert
- delete
- pass
- import
- import from
- Control flow
- blocks of code
- if block
- for loop
- while loop
- break
- continue
- try blocks
- context managers
- Function and class definitions
- function definition
- lambda function
- return statement
- yield, yield from
- global, nonlocal
- class definition
- Async and await
- async function definition
- await expression
- async for loop
- async context managers