~ubuntu-branches/ubuntu/trusty/python3.3/trusty

« back to all changes in this revision

Viewing changes to Lib/pprint.py

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2013-11-19 08:46:55 UTC
  • mfrom: (22.1.15 sid)
  • Revision ID: package-import@ubuntu.com-20131119084655-pueqfadzs5v1xf53
Tags: 3.3.3-1
* Python 3.3.3 release.
* Update to 20131119 from the 3.3 branch.
* Regenerate the patches.
* Update the symbols files.
* Fix test support when the running kernel doesn't handle port reuse.
* libpython3.3-minimal replaces libpython3.3-stdlib (<< 3.2.3-7).
  Closes: #725240.

Show diffs side-by-side

added added

removed removed

Lines of Context:
205
205
                if issubclass(typ, list):
206
206
                    write('[')
207
207
                    endchar = ']'
208
 
                elif issubclass(typ, set):
209
 
                    if not length:
210
 
                        write('set()')
211
 
                        return
212
 
                    write('{')
213
 
                    endchar = '}'
214
 
                    object = sorted(object, key=_safe_key)
215
 
                elif issubclass(typ, frozenset):
216
 
                    if not length:
217
 
                        write('frozenset()')
218
 
                        return
219
 
                    write('frozenset({')
220
 
                    endchar = '})'
221
 
                    object = sorted(object, key=_safe_key)
222
 
                    indent += 10
223
 
                else:
 
208
                elif issubclass(typ, tuple):
224
209
                    write('(')
225
210
                    endchar = ')'
 
211
                else:
 
212
                    if not length:
 
213
                        write(rep)
 
214
                        return
 
215
                    if typ is set:
 
216
                        write('{')
 
217
                        endchar = '}'
 
218
                    else:
 
219
                        write(typ.__name__)
 
220
                        write('({')
 
221
                        endchar = '})'
 
222
                        indent += len(typ.__name__) + 1
 
223
                    object = sorted(object, key=_safe_key)
226
224
                if self._indent_per_level > 1:
227
225
                    write((self._indent_per_level - 1) * ' ')
228
226
                if length: