{"action":"created","issue":{"url":"https://api.github.com/repos/pallets/jinja/issues/912","repository_url":"https://api.github.com/repos/pallets/jinja","labels_url":"https://api.github.com/repos/pallets/jinja/issues/912/labels{/name}","comments_url":"https://api.github.com/repos/pallets/jinja/issues/912/comments","events_url":"https://api.github.com/repos/pallets/jinja/issues/912/events","html_url":"https://github.com/pallets/jinja/issues/912","id":370712511,"node_id":"MDU6SXNzdWUzNzA3MTI1MTE=","number":912,"title":"scientific notation not supported in Python expressions","user":{"login":"jason-s","id":738893,"node_id":"MDQ6VXNlcjczODg5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/738893?v=4","gravatar_id":"","url":"https://api.github.com/users/jason-s","html_url":"https://github.com/jason-s","followers_url":"https://api.github.com/users/jason-s/followers","following_url":"https://api.github.com/users/jason-s/following{/other_user}","gists_url":"https://api.github.com/users/jason-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-s/subscriptions","organizations_url":"https://api.github.com/users/jason-s/orgs","repos_url":"https://api.github.com/users/jason-s/repos","events_url":"https://api.github.com/users/jason-s/events{/privacy}","received_events_url":"https://api.github.com/users/jason-s/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":4,"created_at":"2018-10-16T17:10:27Z","updated_at":"2018-10-16T18:40:14Z","closed_at":null,"author_association":"NONE","body":"```\r\n>>> import jinja2\r\n>>> jinja2.__version__\r\n'2.10'\r\n>>> T = jinja2.Template('{{ 0.001 }}')\r\n>>> T.render()\r\nu'0.001'\r\n>>> T = jinja2.Template('{{ 1e-3 }}')\r\nTraceback (most recent call last):\r\n  File \"<stdin>\", line 1, in <module>\r\n  File \"c:\\app\\python\\anaconda\\2\\lib\\site-packages\\jinja2\\environment.py\", line 945, in __new__\r\n    return env.from_string(source, template_class=cls)\r\n  File \"c:\\app\\python\\anaconda\\2\\lib\\site-packages\\jinja2\\environment.py\", line 880, in from_string\r\n    return cls.from_code(self, self.compile(source), globals, None)\r\n  File \"c:\\app\\python\\anaconda\\2\\lib\\site-packages\\jinja2\\environment.py\", line 591, in compile\r\n    self.handle_exception(exc_info, source_hint=source_hint)\r\n  File \"c:\\app\\python\\anaconda\\2\\lib\\site-packages\\jinja2\\environment.py\", line 780, in handle_exception\r\n    reraise(exc_type, exc_value, tb)\r\n  File \"<unknown>\", line 1, in template\r\njinja2.exceptions.TemplateSyntaxError: expected token 'end of print statement', got 'e'\r\n```"},"comment":{"url":"https://api.github.com/repos/pallets/jinja/issues/comments/430350965","html_url":"https://github.com/pallets/jinja/issues/912#issuecomment-430350965","issue_url":"https://api.github.com/repos/pallets/jinja/issues/912","id":430350965,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDM1MDk2NQ==","user":{"login":"jason-s","id":738893,"node_id":"MDQ6VXNlcjczODg5Mw==","avatar_url":"https://avatars1.githubusercontent.com/u/738893?v=4","gravatar_id":"","url":"https://api.github.com/users/jason-s","html_url":"https://github.com/jason-s","followers_url":"https://api.github.com/users/jason-s/followers","following_url":"https://api.github.com/users/jason-s/following{/other_user}","gists_url":"https://api.github.com/users/jason-s/gists{/gist_id}","starred_url":"https://api.github.com/users/jason-s/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jason-s/subscriptions","organizations_url":"https://api.github.com/users/jason-s/orgs","repos_url":"https://api.github.com/users/jason-s/repos","events_url":"https://api.github.com/users/jason-s/events{/privacy}","received_events_url":"https://api.github.com/users/jason-s/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T18:40:14Z","updated_at":"2018-10-16T18:40:14Z","author_association":"NONE","body":"I expected you to comment that.\r\n\r\nNo, it doesn't make sense, because I have parameters that are configured in the template for various situations. Other templates look at other aspects of the data model in different ways that are customizable by using different templates. My Python script is responsible for setting up the data model, and different templates show different views of it. Configuring the range of values shown on a log plot is well within the range of responsibility for the template. Yes, I could move it to a config file, and then have Python handle that part, but I use Jinja all the time for quick little scripting tasks like this, and it seems odd that I can do all these amazing things in Jinja templates (like the `for` loop in my example) but I can't use scientific notation. \r\n\r\nI have workarounds, so it's not blocking me from getting things done, but they're ugly. I'm an engineer; scientific notation is one of my basic tools and I can't use it here."}}
{"actor":{"display_login":"jason-s"}}