howto check is object a func, lambda-func or something else?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • dmitrey

    #1

    howto check is object a func, lambda-func or something else?

    hi all,
    howto check is object Arg1
    - a func, lambda-func
    - something else?

    I tried callable(Arg1), but callable(lambda-func) returnes False

    Thx, D.

  • Gregor Horvath

    #2
    Re: howto check is object a func, lambda-func or something else?

    dmitrey schrieb:
    howto check is object Arg1
    - a func, lambda-func
    - something else?
    >
    I tried callable(Arg1), but callable(lambda-func) returnes False
    I don't understand your problem:
    >>callable(lamb da:0)
    True


    Please post your relevant code.

    Greg

    Comment

    • 7stud

      #3
      Re: howto check is object a func, lambda-func or something else?

      On Apr 29, 11:19 am, dmitrey <open...@ukr.ne twrote:
      >
      callable(lambda-func) returnes False
      >
      I'm not seeing that. Try this:

      f = lambda x: x
      print callable(f)

      ---output:--
      True

      Comment

      • dmitrey

        #4
        Re: howto check is object a func, lambda-func or something else?

        Thank you, I have fixed the bug

        Comment

        Working...