njuptxiaot / json-template

Automatically exported from code.google.com/p/json-template
0 stars 0 forks source link

Template.expand does not accept an encoding paramter #3

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Run the simple example:  jsontemplate.expand('Hello {name}', {'name':
'world'})

Results in:
>>> jsontemplate.expand('Hello {name}', {'name': 'world'})
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "jsontemplate.py", line 658, in expand
    return t.expand(dictionary, encoding=encoding)
TypeError: expand() got an unexpected keyword argument 'encoding'

The module method expand passes an encoding param to the Template.expand
method, which does not define an encoding param in its signature.

What version of the product are you using? On what operating system?
MacOSX / (FreeBSD-like)
Python 2.5.1

Original issue reported on code.google.com by n8ag...@gmail.com on 30 Mar 2009 at 5:10

GoogleCodeExporter commented 8 years ago
Sorry about that, just fixed it.  I just removed the concept of encoding 
because it's
unicode agnostic, and forgot to change that function.

(Now the template system does no encoding at all -- it returns unicode() or 
str()
instances dependings on the types of input you give it, which I think is the 
right API)

Original comment by gtempacc...@yahoo.com on 30 Mar 2009 at 7:43