Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 17331

Can parameters of a function that is returned by another function be accessed [duplicate]

$
0
0

How to access variables of a function that has been returned

conftest.py

@pytest.fixture(scope="session")Def number():  def number():    a1 = 10    b1 = 20    c1 = a1+b1  return number

num.py

def test(number):    print("val = ",number.c1)

getting the following error for aboveAttributeError: 'function' object has no attribute 'c1'How do I access 'c1' in this case?

is it possible to access attributes of a function that has been returned?


Viewing all articles
Browse latest Browse all 17331

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>