[Commits] [wesnoth/wesnoth] 13c988: wmltools: refine comma_split function

GitHub noreply at github.com
Fri Mar 13 08:36:36 UTC 2015


  Branch: refs/heads/master
  Home:   https://github.com/wesnoth/wesnoth
  Commit: 13c988515639c12ef869ae5b68b02ea40d20105c
      https://github.com/wesnoth/wesnoth/commit/13c988515639c12ef869ae5b68b02ea40d20105c
  Author: Groggy Dice <groggydice at yahoo.com>
  Date:   2015-03-13 (Fri, 13 Mar 2015)

  Changed paths:
    M data/tools/wesnoth/wmltools.py

  Log Message:
  -----------
  wmltools: refine comma_split function

First: minor change of the argument name passed to the function
from "value" to "csstring", since the string might not be an
attribute value.

Second: more testing pointed out that an empty list would not
meet the "if list:" condition and would not be extended. So
make it explicitly "!= None".

Third: when asking on IRC about trailing whitespace, it was
noted that utils::split also removed empty entries, which
reminded me that I should do that as well.

The biggest change is that the function will now rstrip() by
default, with other options for dealing with trailing
whitespace offered.





More information about the Commits mailing list