Re: Create datetime instance using a tuple.

2005-07-07 Thread John Machin
Negroup wrote: >>Use: >>dt =3D datetime(*t) >> > > > Thanks for the quick reply. > I can't find any doc about '*' used in this context. Have you some url > or suggestion for which terms search in Google? http://www.python.org/doc/2.4.1/tut/tut.html Then read this section 4.7.4 Unpacking Argum

Re: Create datetime instance using a tuple.

2005-07-07 Thread Negroup
> > Use: > dt =3D datetime(*t) > Thanks for the quick reply. I can't find any doc about '*' used in this context. Have you some url or suggestion for which terms search in Google? -- http://mail.python.org/mailman/listinfo/python-list

Re: Create datetime instance using a tuple.

2005-07-06 Thread Dan Bishop
Qiangning Hong wrote: > On 6 Jul 2005 02:01:55 -0700, Negroup <[EMAIL PROTECTED]> wrote: > > Hi, all. > > I would like to know if it is possible to create a datetime instance > > using a tuple instead of single values. > > > > I mean: > > >>> from datetime import datetime > > >>> t = (1, 2, 3) > >

Re: Create datetime instance using a tuple.

2005-07-06 Thread Qiangning Hong
On 6 Jul 2005 02:01:55 -0700, Negroup <[EMAIL PROTECTED]> wrote: > Hi, all. > I would like to know if it is possible to create a datetime instance > using a tuple instead of single values. > > I mean: > >>> from datetime import datetime > >>> t = (1, 2, 3) > >>> dt = datetime(t) > Traceback (most