Changeset 5061cd6 in git for modules/python
- Timestamp:
- Sep 21, 2005, 9:49:17 AM (19 years ago)
- Branches:
- (u'fieker-DuVal', '117eb8c30fc9e991c4decca4832b1d19036c4c65')(u'spielwiese', '38dfc5131670d387a89455159ed1e071997eec94')
- Children:
- 535a90f86c2de40dedb322577e7a72036eb78b04
- Parents:
- f8d3784d894e063faf10053a22ff58e474036840
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
modules/python/interpreter.py
rf8d378 r5061cd6 1 1 from Singular import * 2 def debug_out(s): 3 print s 2 4 #def build_arg_list(*args) 3 5 def list2arg_list(args): … … 35 37 proc.print_type() 36 38 raise Exception 39 prepare_ring(args) 37 40 l=list2arg_list(args) 38 return call_interpreter_method(proc, l) 41 erg= call_interpreter_method(proc, l) 42 finish_ring() 43 return erg 39 44 try: 40 45 fun_wrapper.__name__=name … … 61 66 l=list2arg_list(args) 62 67 return cbm(name,l) 68 69 def find_rings(arglist): 70 """FIXME: doesn't handle everything and depth""" 71 for item in arglist: 72 if isinstance(item,polynomial) or isinstance(item,ideal): 73 return [item.ring()] 74 return [] 75 76 77 oldrings=[] 78 def prepare_ring(arglist): 79 rl=find_rings(arglist) 80 debug_out("rl is" +str(rl)) 81 if len(rl)==1: 82 r=rl[0] 83 oldrings.append(ring()) 84 r.set() 85 else: 86 if len(rl)==0: 87 oldrings.append(None) 88 else: 89 debug_out("Warning to many rings in call") 90 oldrings.append(None) 91 def finish_ring(): 92 r=oldrings.pop() 93 if r: 94 r.set() 95
Note: See TracChangeset
for help on using the changeset viewer.