コード例 #1
0
ファイル: exchange.py プロジェクト: appannie/kombu
 def key_to_pattern(self, rkey):
     """Get the corresponding regex for any routing key."""
     return '^%s$' % ('\.'.join(
         self.wildcards.get(word, word)
         for word in escape_regex(rkey, '.#*').split('.')
     ))
コード例 #2
0
 def key_to_pattern(self, rkey):
     """Get the corresponding regex for any routing key."""
     return '^%s$' % (r'\.'.join(
         self.wildcards.get(word, word)
         for word in escape_regex(rkey, '.#*').split('.')))
コード例 #3
0
 def key_to_pattern(self, rkey):
     """Get the corresponding regex for any routing key."""
     return "^%s$" % (r"\.".join(
         self.wildcards.get(word, word)
         for word in escape_regex(rkey, ".#*").split(".")))