## ## most useful example from here: https://www.attrs.org/en/stable/examples.html from joecceasy import Easy ; #Easy.Init() @Easy.DataClass class MyDataClass: simple: bool = True dataclassesAreTheOnlyOption: bool = False thisCouldBeAnything: object = None myDataInstance = MyDataClass( ) Easy.Ic( myDataInstance ) Point2d = Easy.NamedTuple( 'Point2d', ['x', 'y']) point2d = Point2d( 5, -2 ) Easy.Ic( point2d )
from joecceasy import Easy #ic, tt = Easy.Ic, Easy.TrimAndTab w = '4' x = 3 y = 5 z = "some text" print(""" We can use 'Easy.Ic' directly to show a var, value, and type \n""") Easy.Ic(w) print(""" ... but often it's better to make a var pointing to it with something like 'ic = Easy.Ic' \n""") ic = Easy.Ic ic('y') print(""" Even better, We can use 'Easy.See' directly to show a variable by name, a string evaluated as an expression, also with value and type \n""") Easy.See('y+1')