I am unable to get case classes to work correctly on my machine. I am running this on Windows with Python 2.7.6 32-bit (have tried 2 different python installations):
In [14]: from macropy.case_classes import macros, case
In [15]: @case
....: class Point(x,y):
....: pass
....:
---------------------------------------------------------------------------
NameError Traceback (most recent call last)
<ipython-input-15-82da36e76a20> in <module>()
1 @case
----> 2 class Point(x,y):
3 pass
4
NameError: name 'x' is not defined
I tried to run the example as well:
----> 1 import examples.using_macros.target
C:\macropy-master\docs\examples\using_macros\target.py in <module>()
2
3 @case
----> 4 class Point(x, y): pass
5
6 p = Point(1, 2)
NameError: name 'x' is not defined
For fun I also tried show_expanded:
In [13]: with show_expanded:
....: @case
....: class Point(x,y):
....: pass
....:
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-13-32d9ae40feb8> in <module>()
----> 1 with show_expanded:
2 @case
3 class Point(x,y):
4 pass
5
AttributeError: __exit__
Any help would be appreciated.
Thanks,
Matt