python前加r

上一篇 / 下一篇  2014-05-14 18:30:41 / 个人分类:python

from django.conf.urls.defaults import *
from mysite.views import hello, current_datetime, hours_ahead
urlpatterns = patterns
('', (r'^hello/$', hello), (r'^time/$', current_datetime), (r'^time/plus/(\d{1,2})/$', hours_ahead), )
加r表示后面的是普通字符,不发生转义主要在\n  就是\n而不是换行

详见日志http://blog.csdn.net/zhangxinrun/article/details/8124333

TAG: Python python 加r

 

评分:0

我来说两句

Open Toolbar