Python Forum
Mysterious Indentation Problem
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Mysterious Indentation Problem
#6
The evaluations after return, should shifted in own functions.
Then you can use the functions instead. This will cleanup
the code a little bit. Give them verbs as names.

return ((1/(16*dt))+(1/(8*dz**2))+(1/(4*he*he*dr*dr))+(Biz/(8*dz)))
return ((Nr-1)/(2*dt))+(Bir*(Nr-1)/(2*he*he*dr))+(Biz*(Nr-1)/dz)+((Nr-1)/dz**2)+((Nr-1.5)/(2*he*he*dr*dr))
return (j-1)*((1/(2*dt))+(1/(he*dr)**2)+(1/dz**2)+(Biz/dz))
return (1/(16*dt))+(1/(16*dz**2))+(1/(4*dr*dr*he*he))+(Biz/(8*dz))
return (1/(8*dt))+(2/(8*dz))+(1/(2*he*he*dr*dr))
return ((Nr-1.5)/(he*he*dr*dr))+(Nr-1)*((1/2*dt)+(Bir/(2*he*he*dr))+(Biz/dz)+((1/dz**2)))
return (j-1)*((1/(2*dt))+(1/(he*he*dr*dr))+(1/(dz**2))+(Biz/dz))
return ((Nr-1.5)/(he*he*dr*dr))+(Nr-1)*((1/(2*dt))+(Bir/(he*he*dr))+(Biz/dz)+(1/dz**2))
return (j-1)*((1/dt) + (2/(he*dr)**2) + (2/dz**2))
Instead you'll do this later:
return function_1(dt, dz, he, Biz)
Almost dead, but too lazy to die: https://sourceserver.info
All humans together. We don't need politicians!
Reply


Messages In This Thread
Mysterious Indentation Problem - by Dakodak - Jun-20-2019, 03:10 PM
RE: Mysterious Indentation Problem - by ichabod801 - Jun-20-2019, 04:36 PM
RE: Mysterious Indentation Problem - by Dakodak - Jun-21-2019, 06:55 AM
RE: Mysterious Indentation Problem - by noisefloor - Jun-21-2019, 07:02 AM
RE: Mysterious Indentation Problem - by Dakodak - Jun-21-2019, 07:08 AM
RE: Mysterious Indentation Problem - by DeaD_EyE - Jun-21-2019, 07:38 AM
RE: Mysterious Indentation Problem - by Dakodak - Jun-21-2019, 09:52 AM
RE: Mysterious Indentation Problem - by noisefloor - Jun-21-2019, 11:11 AM
RE: Mysterious Indentation Problem - by ichabod801 - Jun-21-2019, 12:38 PM
RE: Mysterious Indentation Problem - by noisefloor - Jun-21-2019, 01:49 PM
RE: Mysterious Indentation Problem - by metulburr - Jun-21-2019, 03:35 PM
RE: Mysterious Indentation Problem - by Dakodak - Jun-24-2019, 06:23 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Mysterious Extra New-Line trevorkavanaugh 2 2,528 Feb-27-2019, 07:13 PM
Last Post: trevorkavanaugh
  Indentation if/else problem Rikk 3 2,813 May-25-2018, 01:10 PM
Last Post: buran
  Mysterious syntax errors... help? friendlymegalomaniac 3 3,030 Apr-26-2018, 09:22 PM
Last Post: micseydel

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020