Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1093)

Unified Diff: python/musicxml.py

Issue 573230043: musicxml: Use method to get number of Lyric (Closed)
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | scripts/musicxml2ly.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: python/musicxml.py
diff --git a/python/musicxml.py b/python/musicxml.py
index 8a24204145bd0b24f23922111a06a709d33c3f4e..91cff75acfa8d3a57bb77a41c94d3faa6f93c01c 100644
--- a/python/musicxml.py
+++ b/python/musicxml.py
@@ -958,7 +958,7 @@ class Syllabic(Music_xml_node):
class Lyric(Music_xml_node):
- def number(self):
+ def get_number(self):
"""
Return the number attribute(if it exists) of the lyric element.
@@ -966,7 +966,7 @@ class Lyric(Music_xml_node):
@return: The value of the number attribute
"""
if hasattr(self, 'number'):
- return self.number
+ return int(self.number)
else:
return -1
@@ -1240,7 +1240,7 @@ class Musicxml_voice:
self.has_lyrics = len(lyrics) > 0
for l in lyrics:
- nr = l.number
+ nr = l.get_number()
Dan Eble 2019/11/11 13:34:38 I infer from your change summary that you verified
hahnjo 2019/11/11 15:50:42 Yes, it originally showed up when porting to Pytho
if(nr > 0) and not(nr in self._lyrics):
self._lyrics.append(nr)
« no previous file with comments | « no previous file | scripts/musicxml2ly.py » ('j') | no next file with comments »

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b