python - Nest multiple yield functions without eval -


I have the following structure (which may need to be reworked, but I feel natural):

  DEF (BaseWire): If type (basware) == Generator type: Production from bassware: yield bassware DRT multiplier: Base type: Type (base) == Generator type: for item in bass : Produce item * 2 other: produce baseVar * 2 funcs = {'get': get, 'multiply': multiply} for result = 10 function f: result = funcs [f] (results) print (list)  

There will be another approach (but it is not dynamic) that the way I want to perform intelligent work, where a moving object is passed to each device, Getting more speed (theoretically) than:

  Multiply for the result (mill (10)): ...   

How do I The name of the function without any yield functions and nest generator object in one line, getattr

Without hard coding again, what do you want to do if you have different jobs, on single elements Use the map:

  def get (x): return x def multiply (x): return x * 2 print (list (map (multiply), map (get, [10]))   

How do you want to get your names? From outer source, then your word is internally correct, then for function in function:

  funcs = (get, multiply) result = [10] for fax: Results = Map (fax, result)    

Comments

Popular posts from this blog

Pass DB Connection parameters to a Kettle a.k.a PDI table Input step dynamically from Excel -

multithreading - PhantomJS-Node in a for Loop -

c++ - MATLAB .m file to .mex file using Matlab Compiler -