It is currently 03 Jun 2020, 05:53

• Featuring Members' Works (Image Attachments) •
1: member
2: member
3: member
4: member
5: member

GIMP/GL:  Tutorials | Tips | 🡆 Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Python code error messages

GIMP or GIMP LEARN forum related Questions
Alchemist
Forum Member

Python code error messages

Post#1 by Alchemist » 13 May 2019, 20:58


Hello Coders,

In Python code what is the meaning of the error, "unexpected indent" ?

I see this a lot in bad plugins!

Thanks, Alchemist.....
GIMP Learn rocks...
0

tim
GL Blogger

Post#2 by tim » 14 May 2019, 03:47


indentation is wrong.
For example if a function starts then a colon, all code after that function definition has to be the same indentation.
Maybe 4 spaces or a tab but they have to be the same.
If you write an if statement for example after the colon, the next few or how ever many lines that's part of the if block must be of the same indentation.
Python is the only language I know that forces strict indentation and indentation actually means something.
Other languages, you can indent however you like but people still try to to indent in such a way that it's readable but it's not required like Python.
aka Tin
:tree_02:
Tin's: Favorite Index | Simple Art === fb4yt video search | fb4yt recent video views report
Lottery numbers from image | Interested Members in TLF
Paying for hosting is to support my hobby, and donating money made from ads to The Red Cross.
         
0


GIMP/GL:  Tutorials | Tips | 🡆 Questions | Interests | Script Requests
Recommendations:  Index | Top 10
Resources:  Python-Fu Plug-ins | Scheme-Fu Scripts | GIMP
Python:  Lessons | Questions | Exercises
The Arts:  GIMPed | GIMPed Photos | Other | Contests | Public Domain Images | Isolated Images | Blender
Inkscape
Social:  Say Hello | Anything Goes | Shares | FCSP

Post Reply
  • Similar Topics
    Replies
    Views
    Last post

Who is online

Users browsing this forum: No registered users and 9 guests