Python Forum
indents disappearing from output after previewing post
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
indents disappearing from output after previewing post
#5
As far as I can tell no formatting is included (when I use view source in the editor). Pasting with ctrl + shift + v makes no difference either.

Also, it seems that although only 1 space is removed when previewing, all tabs are removed:

Pasted using ctrl + v, 1 preview:
def get_protnumber2(prefix):
l = []
for attribute in dir(socket):
if attribute.startswith(prefix):
key = getattr(socket, attribute)
value = attribute

l.append((key,value))

return dict(l)
Pasted using ctrl + shift + v, 1 preview:
def get_protnumber2(prefix):
l = []
for attribute in dir(socket):
if attribute.startswith(prefix):
key = getattr(socket, attribute)
value = attribute

l.append((key,value))

return dict(l)
Pasted without preview:
def get_protnumber2(prefix):
	l = []
	for attribute in dir(socket):
		if attribute.startswith(prefix):
			key = getattr(socket, attribute)
			value = attribute
			
			l.append((key,value))
			
	return dict(l)
Edit:
apparently this is the exact same issue that was being discussed in this thread.
Reply


Messages In This Thread
RE: indents disappearing from output after previewing post - by MTVDNA - Jul-24-2017, 01:11 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  error while previewing locked post Kebap 4 7,079 Sep-17-2016, 05:52 AM
Last Post: metulburr

Forum Jump:

User Panel Messages

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