Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(23)

Issue 10217004: Get rid of overloaded toDartValue. (Closed)

Created:
8 years, 8 months ago by podivilov
Modified:
8 years, 8 months ago
Reviewers:
Anton Muhin, antonm
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Get rid of overloaded toDartValue. R=antonm@chromium.org Committed: https://code.google.com/p/dart/source/detail?r=6951

Patch Set 1 #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+3 lines, -8 lines) Patch
M lib/dom/scripts/generator.py View 2 chunks +3 lines, -8 lines 3 comments Download

Messages

Total messages: 4 (0 generated)
podivilov
8 years, 8 months ago (2012-04-24 19:06:46 UTC) #1
Anton Muhin
LGTM https://chromiumcodereview.appspot.com/10217004/diff/1/lib/dom/scripts/generator.py File lib/dom/scripts/generator.py (right): https://chromiumcodereview.appspot.com/10217004/diff/1/lib/dom/scripts/generator.py#newcode545 lib/dom/scripts/generator.py:545: function_name = re.sub(r' [a-z]', lambda x: x.group(0)[1:].upper(), self.native_type()) ...
8 years, 8 months ago (2012-04-25 10:05:17 UTC) #2
podivilov
https://chromiumcodereview.appspot.com/10217004/diff/1/lib/dom/scripts/generator.py File lib/dom/scripts/generator.py (right): https://chromiumcodereview.appspot.com/10217004/diff/1/lib/dom/scripts/generator.py#newcode545 lib/dom/scripts/generator.py:545: function_name = re.sub(r' [a-z]', lambda x: x.group(0)[1:].upper(), self.native_type()) On ...
8 years, 8 months ago (2012-04-25 11:12:58 UTC) #3
Anton Muhin
8 years, 8 months ago (2012-04-25 13:09:55 UTC) #4
LGTM

https://chromiumcodereview.appspot.com/10217004/diff/1/lib/dom/scripts/genera...
File lib/dom/scripts/generator.py (right):

https://chromiumcodereview.appspot.com/10217004/diff/1/lib/dom/scripts/genera...
lib/dom/scripts/generator.py:545: function_name = re.sub(r' [a-z]', lambda x:
x.group(0)[1:].upper(), self.native_type())
I see, thanks for explanations.

Still maybe: def capitalize(s): return s[0].upper() + s[1:]?

Up to you.

On 2012/04/25 11:12:58, podivilov wrote:
> On 2012/04/25 10:05:18, antonmuhin wrote:
> > nit.
> > 
> > I am probably biased here, but is it more readable?
> > 
> > If you hate capwords, maybe something like:
> > 
> > parts = self.native_type().split()
> > type = parts[0] + ''.join((s.capitalize() for s in parts[1:]))
> > 
> > ?
> 
> I've changed this logic for ScriptValue -> scriptValueToDart case. Capitalize
is
> doing the wrong thing.

Powered by Google App Engine
This is Rietveld 408576698