File tree Expand file tree Collapse file tree 1 file changed +18
-1
lines changed
Expand file tree Collapse file tree 1 file changed +18
-1
lines changed Original file line number Diff line number Diff line change @@ -1359,8 +1359,25 @@ def keys(self):
13591359 '''
13601360 Return the keys found in the user's
13611361 :class:`~music21.environment.Environment` object.
1362+
1363+ Changed in v9.3 -- yields a generator, like Python 3 dict -- rather than
1364+ returning a list
1365+ '''
1366+ yield from (self ._environment .getRefKeys () + ['localCorpusPath' ])
1367+
1368+ def items (self ):
1369+ '''
1370+ dict-like interface to allow iterating over items of the UserSettings.
1371+ '''
1372+ for k in self .keys ():
1373+ yield (k , self [k ])
1374+
1375+ def values (self ):
1376+ '''
1377+ dict-like interface to allow iterating over values of the UserSettings.
13621378 '''
1363- return self ._environment .getRefKeys () + ['localCorpusPath' ]
1379+ for _ , v in self .items ():
1380+ yield v
13641381
13651382 def restoreDefaults (self ):
13661383 '''
You can’t perform that action at this time.
0 commit comments