#!/usr/bin/env python
# -*- coding: utf-8 -*-
friends_with_unicode = ('Günter', 'Clauß', 'Ürsala')
print('\n'.join(sorted(friends_with_unicode)))
'''
If the shabang ('#!') line is the first line of the script
And the coding: utf-8 line is the second line of the script
Then it is recognized as a Python 2 script with unicode
literals on non-Pythonista platforms (e.g. Mac OS X)
But Pythonista will raise an Encoding Warning and not allow
the script to run without an "Auto-Fix" option which
will duplicate line 2 as the new first line of the
script which breaks portability to other platforms.
'''
http://docs.python.org/2/howto/unicode.html#unicode-literals-in-python-source-code says "Python supports writing Unicode literals in any encoding, but you have to declare the encoding being used. This is done by including a special comment as either the first or second line of the source file"
Pythonista is currently only looking for this special comment on the first but not on the second line of the script.