diff options
| author | Barry Warsaw | 2014-04-28 11:23:35 -0400 |
|---|---|---|
| committer | Barry Warsaw | 2014-04-28 11:23:35 -0400 |
| commit | d4d71f71f08d6d440b17482eecc5472dcfe6cbae (patch) | |
| tree | 71f08b3d60f698883294eaa6d1bf366a095da011 /src/mailman/styles/docs | |
| parent | 7536530dcd8d6303c0a869e8c9c2cb2517b9b018 (diff) | |
| download | mailman-d4d71f71f08d6d440b17482eecc5472dcfe6cbae.tar.gz mailman-d4d71f71f08d6d440b17482eecc5472dcfe6cbae.tar.zst mailman-d4d71f71f08d6d440b17482eecc5472dcfe6cbae.zip | |
Use print functions consistently through, and update all __future__ imports to
reflect this.
Also, mock out sys.stderr on some tests so that their nose2 output is quieter.
A few other minor coding style consistencies.
Diffstat (limited to 'src/mailman/styles/docs')
| -rw-r--r-- | src/mailman/styles/docs/styles.rst | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/mailman/styles/docs/styles.rst b/src/mailman/styles/docs/styles.rst index 00d95b08d..270b0cdcc 100644 --- a/src/mailman/styles/docs/styles.rst +++ b/src/mailman/styles/docs/styles.rst @@ -20,7 +20,7 @@ To start with, there are a few legacy styles. >>> from mailman.interfaces.styles import IStyleManager >>> manager = getUtility(IStyleManager) >>> for style in manager.styles: - ... print style.name + ... print(style.name) legacy-announce legacy-default @@ -29,13 +29,13 @@ style is applied. >>> from mailman.interfaces.listmanager import IListManager >>> mlist = getUtility(IListManager).create('ant@example.com') - >>> print mlist.display_name + >>> print(mlist.display_name) None The legacy default style sets the list's display name. >>> manager.get('legacy-default').apply(mlist) - >>> print mlist.display_name + >>> print(mlist.display_name) Ant @@ -60,7 +60,7 @@ You can register a new style with the style manager. All registered styles are returned in alphabetical order by style name. >>> for style in manager.styles: - ... print style.name + ... print(style.name) a-test-style legacy-announce legacy-default @@ -68,7 +68,7 @@ All registered styles are returned in alphabetical order by style name. You can also ask the style manager for the style, by name. >>> test_style = manager.get('a-test-style') - >>> print test_style.name + >>> print(test_style.name) a-test-style @@ -79,13 +79,13 @@ You can unregister a style, making it unavailable in the future. >>> manager.unregister(test_style) >>> for style in manager.styles: - ... print style.name + ... print(style.name) legacy-announce legacy-default Asking for a missing style returns None. - >>> print manager.get('a-test-style') + >>> print(manager.get('a-test-style')) None @@ -106,7 +106,7 @@ Now, when we use the high level API, we can ask for the style to be applied. The style has been applied. - >>> print mlist.display_name + >>> print(mlist.display_name) TEST STYLE LIST If no style name is provided when creating the list, the system default style @@ -127,5 +127,5 @@ other style is explicitly given. >>> with configuration('styles', default=another_style.name): ... manager.register(another_style) ... mlist = create_list('cat@example.com') - >>> print mlist.display_name + >>> print(mlist.display_name) ANOTHER STYLE LIST |
