Underscode

Timeline
Login

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

50 most recent timeline items

2012-04-10
16:04 • Changes to wiki page Underscode (user: ivan)
16:03
[893c7574eb] Remove references to nonexistent Underscode group. (user: ivan, tags: trunk)
15:57 • Changes to wiki page Underscode (user: ivan)
15:55
[792a3f0cd6] There's no longer a Google group for Underscode. (user: ivan, tags: trunk)
2011-12-31
16:34 • Changes to wiki page Underscode (user: ivan)
15:28
[aa5ca738e5] Leaf: Updated readme to point to the Fossil repository. (user: ivan, tags: trunk)
14:29 • Tag changes on 3444ebebff3b3fcc: Add symbolic tag "0.2.0". (user: ivan)
14:29 • Tag changes on f7b50c454dc63451: Add symbolic tag "0.1.0". (user: ivan)
2007-11-28
23:20
[d30c445052] Updated version to 0.2.1.dev after tagging release 0.2.0. (user: ivan@selidor.net, tags: trunk)
22:48
[3444ebebff] Updated version information for the release of 0.2.0. (user: ivan@selidor.net, tags: trunk, 0.2.0)
22:25
[f267aa66d2] Merged in changes from the ``self_quotes_space`` branch.    Now ``__`` escapes the space character instead of the underscore, the main reason of the change being that spaces are expected to happen much more frequently than underscores in strings which *need encoding*, because underscores in the original string are themselves a signal that it has already been converted to some indentifier-compatible form and it doesn't need further encoding.    Besides that, as underscores are frequently used to represent spaces (e.g. ``get_foo`` for "get foo"), it makes more sense to keep them in that role (i.e. ``get__foo_`` instead of ``get_x20foo_``).    This change justifies the bumping of version from 0.1.1.dev to 0.2.0.dev. (user: ivan@selidor.net, tags: trunk)
21:05
[326a7c1ad3] Updated the Underscode core to encode and decode using the new encoding. (user: ivan@selidor.net, tags: trunk)
21:01
[7986bdcc47] Forgot to update the test for valid strings. (user: ivan@selidor.net, tags: trunk)
20:48
[f2cc8d82aa] Changed unit tests to check for the new encoding. (user: ivan@selidor.net, tags: trunk)
20:36
[ce081413dd] Updated all documentation to the new encoding. (user: ivan@selidor.net, tags: trunk)
19:59
[e7a9982d98] With such an important encoding change, we can't still tag this a 0.1.x.    Thus, the version has been bumped to 0.2 (0.2.0.dev to be exact). (user: ivan@selidor.net, tags: trunk)
2007-09-20
18:12
[f46e6bb27e] Point the user to the PyPi to download source packages. (user: ivan@selidor.net, tags: trunk)
18:02
[673468ba65] Removed the ``download_url`` argument to ``setup()``.    Packages are to be stored in the PyPi, so the URL is not needed and confusing. (user: ivan@selidor.net, tags: trunk)
2007-09-19
12:25
[4058b26562] Updated version to 0.1.1.dev after tagging release 0.1.0. (user: ivan@selidor.net, tags: trunk)
12:14
[f7b50c454d] Updated version information for the release of 0.1.0. (user: ivan@selidor.net, tags: trunk, 0.1.0)
2007-09-03
12:38
[f0bf910001] Added license note and other minor changes to ``README.txt``. (user: ivan@selidor.net, tags: trunk)
2007-08-16
16:05
[e92a8e011f] Fixed the URL of the development branch (it uses HTTPS). (user: ivan@selidor.net, tags: trunk)
2007-08-14
22:40
[2a1e4be332] Commited new packaging files and LGPL. (user: ivan@selidor.net, tags: trunk)
22:35
[89ff967636] Updated licensing terms to LGPL 3.0.    Since the LGPL 3 is written in reference to the terms of the GPL 3, I'm including both of them with the source (but the license file and notices clearly state that the license which holds is the LGPL). (user: ivan@selidor.net, tags: trunk)
2007-08-10
22:24
[fd72d55933] Added some files for preparing a standard Distutils-based source distribution. (user: ivan@selidor.net, tags: trunk)
2006-12-08
00:23
[6cb1b2e232] Added a docstring to the ``search_function()`` in ``underscode.codec``. (user: ivan@selidor.net, tags: trunk)
2006-12-07
23:43
[e9ce3779ba] Properly register a search function for the Underscode codec.    Automatic support of external codecs in Python just by dropping a module or package in the $PYTHONPATH worked by pure chance. With Python 2.5, it has been fixed and the trick does no longer work. See SF item #1569084. (user: ivan@selidor.net, tags: trunk)
2006-08-31
07:55
[75622b6a15] Convert arguments to encode and decode functions to the appropriate type.    This is more flexible than strictly checking the type of the input argument, and allows things like:    >>> unicode('this_x20is_x20_u201ca_x20test_u201d_', 'underscode') u'this is \u201ca test\u201d'    Which created an UnderscodeDecoder with a buffer object. Function and codec docstrings have been updated and small doctests have been added.    I somehow felt that the type checking in r33 was broken in a way. Now it has spoiled my lucky strike to make the first release on revision 42! :P (user: ivan@selidor.net, tags: trunk)
2006-08-30
16:56
[d79a17ac21] Small changes to package and core module docstrings.    A link to the Underscode home page has been added to the package docstring, and a note about the DOT file containing the FSM description of underscoded strings has been added to the core module docstring. (user: ivan@selidor.net, tags: trunk)
2006-08-29
09:20
[d49f9f46ea] Added new ``decorators.py`` module.    This is the "Nirvana commit". ;) New decorators have been added that allow to derive calls to methods with an underscoded argument to other methods with the same argument decoded. Also, decorators to allow redirecting access to attributes with an underscoded name to other methods while keeping the instance ``__dict__`` and ``__members__`` up to date have been added.    See the module docstring for complete examples. Have fun! (user: ivan@selidor.net, tags: trunk)
2006-08-28
17:36
[596ac09a72] Small optimization to ``is_underscode_encoded()``.    Also, tiny aesthetical fix to ``codec.py``. (user: ivan@selidor.net, tags: trunk)
07:18
[6e4c8e3bee] Small fixes to docstrings in ``codec.py``. (user: ivan@selidor.net, tags: trunk)
2006-08-27
09:26
[26a81fb211] Changed format name of one-use-flag in codec.one_use_method().    The old format, ``_METHOD_NAME_used``, could create class-private variables (like ``__private_method_used``) with private methods. The new format, ``_used_METHOD_NAME``, avoids that. (user: ivan@selidor.net, tags: trunk)
2006-08-24
17:08
[b47f3f56b0] Added Underscode support for the Python codec API.    The new codec support is under the new ``codec.py`` module, which implements basic ``Codec``, ``StreamWriter`` and ``StreamReader`` classes. The last ones are limited to one read and one write per instance. New doctests have been added.    The new codec is automatically detected by Python just by exporting the ``getregentry()`` function, which returns the tuple of *(encoder, decoder, stream_reader, stream_writer)* required by the Python codec API. (user: ivan@selidor.net, tags: trunk)
11:26
[fa19f74a44] Splitted main module into modules.    Encoding and decoding code has been moved into the ``core`` module, and exceptions have been placed into the ``exceptions`` module. The main test suite has been adapted to also run doctests from the new modules. (user: ivan@selidor.net, tags: trunk)
2006-08-23
23:38
[66662b729a] Fixed bug in encoding that caused some encoded strings to be Unicode. (user: ivan@selidor.net, tags: trunk)
2006-08-17
18:04
[1ba69b88bc] Added string type check to encoder and decoder constructors. (user: ivan@selidor.net, tags: trunk)
17:43
[c5ed1dddc4] Added encoding support.    Encoding support has been implemented via the ``UnderscodeEncoder`` class and the ``underscode_encode()`` function in `underscode/__init__.py`. A new test suite ``EncodingTestSuite`` has been added to `underscode/tests.py`. (user: ivan@selidor.net, tags: trunk)
2006-08-16
20:27
[746577de7a] Minor fix to docstring of ``UnderscodeDecoder.append()``. (user: ivan@selidor.net, tags: trunk)
2006-01-23
23:27
[7923623a08] Added an ``append()`` method to ``UnderscodeDecoder``.    `underscode/__init__.py` As forecasted in the message of revno 10, the ``UnderscodeDecoder`` readily supported extending the encoded string. The new ``append()`` method has been properly documented with ``doctest`` code in the class docstring. (user: ivan@selidor.net, tags: trunk)
20:11
[95b15af987] Implemented tests for decoding encoded characters.    `underscode/tests.py` The new method ``DecodingTestCase.test_valid_character()`` tests for all possible valid encodings of a Unicode character, while the method ``test_invalid_character()`` tests for all invalid and incomplete versions of a valid encoded Unicode character.    The methods ``test_decode_valid()`` and ``test_decode_invalid()`` have been renamed to ``test_valid_string()`` and ``test_invalid_string()`` to match the previous ones.    Since the new methods take care of encoded characters, all the plethora of repeated cases in the tests on whole strings are no longer necessary, so the only encoded character used in them now is ``_``. (user: ivan@selidor.net, tags: trunk)
2006-01-22
23:23
[f81ab4d2aa] Converted temporary tests in the main module into proper unit tests.    The tests in the main body of `underscode/__init__.py` are now implemented using ``unittest`` in the new file `underscode/tests.py`. The new class ``DecodingTestCase`` checks all cases of possible valid and invalid encoding strings according to the number of transitions made by the finite state machine (FSM), taking a whole encoded character as one transition. This reduces the FSM to only five transitions, simplifying the tests.    Of course, this implies that new test units must be written in order to check for incomplete encoded characters. Also, the interface of the class ``UnderscodeDecoder`` is not checked yet. (user: ivan@selidor.net, tags: trunk)
16:01
[e6d02ca097] Added a new `docs/` directory.    The Graphviz file `docs/underscode.dot` defines the finite state machine recongnising and decoding underscoded strings. (user: ivan@selidor.net, tags: trunk)
10:22
[c1ede26207] Divided `underscode/__init__.py` into sections.    Sections are separated from the previous one using a blank line, a form feed character, a reStructuredText-like title in a comment, and another blank line, like this::    ... code of the previous section ...    ^L # Title of the next section # =========================    ... code of the next section ...    Thus, when printing the file, each section starts with a title and ends with a blank line. (user: ivan@selidor.net, tags: trunk)
00:26
[d0eb428f71] Small correction to docstring of `underscode/__init__.py`. (user: ivan@selidor.net, tags: trunk)
00:15
[e1b423fb1d] Removed Unicode characters from docstrings.    `underscode/__init__.py` The Unicode characters in the module docstring have been replaced by ASCII characters or Unicode escape sequences, so the file is no longer tagged as being UTF-8 encoded. (user: ivan@selidor.net, tags: trunk)
00:00
[a27ffbd209] Replaced list comprehension with generator expression on decoding.    `underscode/__init__.py` Timing a simple loop of string decoding yields that using a list comprehension and using a generator expression in ``underscode_decode()`` is equally fast, so the expression is chosen since it may lead to a better memory usage. This is not really important since the strings will surely be short. By the way, string length does not alter the results significantly. (user: ivan@selidor.net, tags: trunk)
2006-01-21
17:19
[9382cdfdf5] Changed termination of multi-line structures to join-style.    Join-style separates the delimiters of a multi-line structure just as if the “join line” (J) order of ``vi`` had been used, i.e. squashing leading whitespace of the joined line into a single space. Some examples::    some_list = [ 'foo', 'bar', 'baz', ]    nested_list = [ [ 'foo', 'bar', ], [ 'foo', 'bar', ], ]    nested_list = [ [ 'foo', 'bar', ], 'baz' ]    result = function( first_arg, (second_arg_0, second_arg_1), third_arg, fourth_arg )    From the second example one can see that structures fitting in a single line are *not* affected by join-style.    IMHO, this style:    1. Looks quite pythonic (no structure terminators on the same level as the beginning of the structure). 2. Makes multi-line structures easy to spot (their beginning character is followed by a space character). 3. It does not make a mess of subsequent terminators (they are separated by spaces).    `underscode/__init__.py` Use join-style for multi-line structures. (user: ivan@selidor.net, tags: trunk)
15:47
[8f7be5dad9] Changed termination of multi-line structures to LISP-style.    `underscode/__init__.py` Multi-line structures (dictionaries, lists, function calls…) with the termination character have been altered so that the terminator is placed at the end of the last line, LISP-style. Indenting it or aligning it to the beginning of the block makes code look confusing or unpythonic.    For instance::    something = [ [0, 1, 2, 3], [4, 5, 6], ] another_thing    or::    something = [ [0, 1, 2, 3], [4, 5, 6], ] another_thing    is now written as::    something = [ [0, 1, 2, 3], [4, 5, 6]] another_thing (user: ivan@selidor.net, tags: trunk)
15:14
[2ccbbdf2aa] Turned copyright and license comment into module variables.    `underscode/__init__.py` The comment containing the copyright and comment of the module has been splitted into the variables ``__copyright__`` (a list of copyright holders, with e-mail addresses and a list of years) and ``__license__`` (a small piece of text). (user: ivan@selidor.net, tags: trunk)