python - file open throws an error float type -


i have 1 method takes many argument , return multiple value

i trying open file in method shows me error like

fc=open("abc.txt","a") type error: 'float' object not callable` 

i don't know why showing error mean there nothing float value. same line if put in calling function create/open file successfully.

  fc=open("abc.txt","a") 

the issue might somewhere else in code, have defined variable called open storing float type value. example -

open = 0.1 

the above line overwrites inbuilt function open float variable, hence after line call open referencing float variable, causing issue. should not use built-in names variables, try renaming variable.


Comments

Popular posts from this blog

How has firefox/gecko HTML+CSS rendering changed in version 38? -

javascript - Complex json ng-repeat -

jquery - Cloning of rows and columns from the old table into the new with colSpan and rowSpan -