#microformats 2014-12-24

2014-12-24 UTC
KartikPrabhu joined the channel
#
kylewm
tommorris: KartikPrabhu: can you think of a disadvantage of changing mf2py.Parser.__init__'s signature to def __init__(self, doc=None, url=None) ?
#
KartikPrabhu
kylewm: what is the advantage?
#
kylewm
KartikPrabhu: I almost never remember to use the parameter names the first time; with named params, it would work with or without the named param
#
kylewm
sorry that was worded very confusingly
#
KartikPrabhu
no i got it
#
KartikPrabhu
but then there is an order in which they are called right?
#
kylewm
they have to be in order unless you specify each parameter by name
#
kylewm
it might make sense to put url before doc, since doc is optional, whereas url is not (really)
KartikPrabhu joined the channel
#
KartikPrabhu
kylewm: can you then just do Parser('example.com')?
#
kylewm
yes, assuming the signature was __init__(url=None, doc=None)
#
KartikPrabhu
but to give just a doc you'd have to do Parser(doc=document)...
#
kylewm
yeah that's correct
#
KartikPrabhu
might work...
#
kylewm
do you have the problem, forgetting to name the parameters?
#
KartikPrabhu
sometimes, but it throws and error anyway
#
kylewm
it does??
#
KartikPrabhu
hmm maybe it just gives nothing
Rastus_Vernon, KartikPrabhu, gRegor`, tantek and philipashlock joined the channel
#
tommorris
KartikPrabhu, kylewm: that all makes sense (sorry for slow response - at 1am this morning, I was busy being ill).
Erkan_Yilmaz, krijnhoetmerbot, theanxy, KartikPrabhu, gRegor`, TallTed, ben_thatmust, Garbee, tantek and KevinMarks_ joined the channel