- def sell(item, price, quantity):
- print "Selling %s unit(s) of %s at %s" % (quantity, item, price)
- sell('Socks', '$2.50', 6)
- sell(item='Socks', price='$2.50', quantity=6)
- sell(item='Socks', quantity=6, price='$2.50')
- sell(price='$2.50', item='Socks', quantity=6)
- sell(price='$2.50', quantity=6, item='Socks')
- sell(quantity=6, item='Socks', price='$2.50')
- sell(quantity=6, price='$2.50', item='Socks')
- sell('Socks', '$2.50', quantity=6)
- sell('Socks', price='$2.50', quantity=6)
- sell('Socks', quantity=6, price='$2.50')
- from django.conf.urls.defaults import *
- from mysite import views
- urlpatterns = patterns('',
- (r'^articles/(/d{4})/$', views.year_archive),
- (r'^articles/(/d{4})/(/d{2})/$', views.month_archive),
- )
- from django.conf.urls.defaults import *
- from mysite import views
- urlpatterns = patterns('',
- (r'^articles/(?P<year>/d{4})/$', views.year_archive),
- (r'^articles/(?P<year>/d{4})/(?P<month>/d{2})/$', views.month_archive),
- )
- month_archive(request, '2006', '03')
- month_archive(request, year='2006', month='03')
新闻热点
疑难解答