Changeset 29fc843 in git for Tst/Short/pyobject.tst


Ignore:
Timestamp:
Aug 1, 2012, 11:31:30 PM (11 years ago)
Author:
Alexander Dreyer <alexander.dreyer@…>
Branches:
(u'jengelh-datetime', 'ceac47cbc86fe4a15902392bdbb9bd2ae0ea02c6')(u'spielwiese', 'ad2543eab51733612ba7d118afc77edca719600e')
Children:
4e59df46c64bb033f20a2ce6b6f131f03b06e6eb
Parents:
a04a05cbf86469aad8cb230b8c9418b1b96c2925
git-author:
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-08-01 23:31:30+02:00
git-committer:
Alexander Dreyer <alexander.dreyer@itwm.fraunhofer.de>2012-08-01 23:32:11+02:00
Message:
new: convert pyobject <-> intvec
File:
1 edited

Legend:

Unmodified
Added
Removed
  • Tst/Short/pyobject.tst

    ra04a05 r29fc843  
    142142ll_empty;
    143143
     144// converting to and from intvec
     145intvec v0;
     146v0;
     147pyobject obj0 = v0;
     148obj0;
     149
     150intvec v=(1,2,3);
     151pyobject obj = v;
     152obj;
     153intvec(obj);
     154
     155intvec(python_eval("[1,2,9999999999]")); // -> error
     156intvec(python_eval("[1,2,list()]"));     // -> error
     157
     158ring r=0,x,lp;
     159def rl = ringlist(r);
     160
     161python_eval("tuple")(list(rl[1..3]));
    144162
    145163tst_status(1);
Note: See TracChangeset for help on using the changeset viewer.