GNOME Bugzilla – Bug 697363
Pango.break_ not accessible
Last modified: 2013-04-18 20:54:09 UTC
>>> from gi.repository import Pango >>> "break_" in dir(Pango) True >>> "break" in dir(Pango) False >>> Pango.break_ Traceback (most recent call last):
+ Trace 231741
return getattr(self._introspection_module, name)
self.__name__, name))
>>> getattr(Pango, "break") <function break_ at 0x7f46e3eb0758> >>> "break" in dir(Pango) True
Created attachment 241242 [details] [review] Remove Python keyword escapement in Repository.find_by_name Strip trailing underscore from module level items before calling g_irepository_find_by_name. This fixes a problem with GI module level items having the same name as a Python keyword raising an AttributeError during access (Pango.break_).
Comment on attachment 241242 [details] [review] Remove Python keyword escapement in Repository.find_by_name Thanks! This looks good to me, also for the -3.8 branch.
Attachment 241242 [details] pushed as 99872a1 - Remove Python keyword escapement in Repository.find_by_name