Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #106955 > unrolled thread
| Started by | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| First post | 2016-04-13 10:05 -0600 |
| Last post | 2016-04-13 10:05 -0600 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: IdentationError; unexpected indent Ian Kelly <ian.g.kelly@gmail.com> - 2016-04-13 10:05 -0600
| From | Ian Kelly <ian.g.kelly@gmail.com> |
|---|---|
| Date | 2016-04-13 10:05 -0600 |
| Subject | Re: IdentationError; unexpected indent |
| Message-ID | <mailman.81.1460563592.15650.python-list@python.org> |
On Wed, Apr 13, 2016 at 9:53 AM, salma ammar <ammarsalma118@gmail.com> wrote: > Hi, > > I am about to run this code using python 2.7. But when executing this code, > an error appears (see attachement): IdentationError; unexpected indent > > What should I rectify to correct this error please? First of all, please post your code exactly as you're trying to run it. All those asterisks make it harder to read and also create doubts about what other changes might have been introduced in the process of being posted. Second, read the error message. It tells you what the problem is: unexpected indent. It should also tell you exactly line the error occurs on, but you didn't include that part of the error message in your post, so we can't help you there. Next time, please post the entire error message, including the traceback. > * edges = net.getNeighboringEdges(x, y, radius)* > * distancesAndEdges = sorted([(dist, edge) for edge, dist in edges])* > * print(distancesAndEdges)* > * edgeofstation[id] = distancesAndEdges[0]* > * print (edgeofstation[id])* That said, these five lines all appear to have inconsistent indentation with the preceding. I don't know what the intent was, but you should correct the indentation of these lines.
Back to top | Article view | comp.lang.python
csiph-web