Регулярные выражения иногда могут быть просто монструозными. Выглядеть это может крайне запутанно. Сами регэкспы и без того история непростая, а когда это длинный паттерн на несколько десятков знаков, разобрать там что-либо становится не просто.
Но на помощь приходит Python и его стремление сделать нашу жизнь проще!
В функциях регулярок можно после паттерна указывать флаги, один из которых позволяет писать паттерны более свободно. А именно, добавлять пробелы и переносы, которые будут игнорированы. В результате мы можем разбить паттерн на строки и добавить комментов.
Чтобы это сработало нужно добавить флаг re.VERBOSE. Пробелы в паттерне теперь следует указывать явно спец символами.
Согласитесь, что даже с именованными группами а таком виде регэкспа выглядит вполне сносно 😉.
#tricks#regex
http://pybee.org/
#BeeWare is a collection of #projects that can be used to help develop, debug and launch #Python software. Each tool follows the #Unix philosophy of doing one thing well. Each tool can be used in isolation, or they can be chained together to provide a rich set of programming tools.
https://pybee.org/news/buzz/2017-google-summer-of-code-final-report-dayanne-fernandes/
After almost 4 months of work on Google Summer of Code 2017, finally I'm completing my proposal. Every widget migration and every commit/PR/issue/discussion with my mentors about Cricket , Toga and rubicon-objc were detailed on the Issue 58.
"Eating your own dog food"
The best way to show that a product is reliable to the customers is use it. So, the way to show that #Toga is an effective tool to build a #GUI is to build a complete application using it.
#Cricket is a graphical tool that helps you run your #test suites. Its current version is implemented using #Tkinter as the main GUI framework. So, why not test Toga inside of another product from #BeeWare? That's what I have acomplished during my GSoC work.