On Aug 27, 10:45 am, Roy Smith wrote:
> In article <4e592852$0$29965$c3e8da3$54964...@news.astraweb.com>,
> Steven D'Aprano wrote:
>
> > open("file.txt") # opens the file
> > .read() # reads the contents of the file
> > .split("\n\n") # splits the text on double-newlines.
>
> Th
On Aug 16, 1:37 am, Steven D'Aprano wrote:
> On Tue, 16 Aug 2011 04:14 pm ChasBrown wrote:
>
>
>
> > On Aug 15, 4:26 pm, Johannes wrote:
> >> hi list,
> >> what is the best way to check if a given list (lets call it l1) is
> >> totally contained
On Aug 15, 11:51 pm, Laszlo Nagy wrote:
> >> hi list,
> >> what is the best way to check if a given list (lets call it l1) is
> >> totally contained in a second list (l2)?
>
> >> for example:
> >> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> >> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is
On Aug 15, 4:26 pm, Johannes wrote:
> hi list,
> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?
>
> for example:
> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
> l
On Aug 15, 4:26 pm, Johannes wrote:
> hi list,
> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?
>
> for example:
> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
> l
On Aug 15, 4:26 pm, Johannes wrote:
> hi list,
> what is the best way to check if a given list (lets call it l1) is
> totally contained in a second list (l2)?
>
> for example:
> l1 = [1,2], l2 = [1,2,3,4,5] -> l1 is contained in l2
> l1 = [1,2,2,], l2 = [1,2,3,4,5] -> l1 is not contained in l2
> l
On Jul 2, 11:08 am, John Salerno wrote:
> On Jul 2, 12:33 pm, MRAB wrote:
>
>
>
> > On 02/07/2011 17:56, John Salerno wrote:
>
> > > I thought I had finally grasped decorators, but the error I'm getting
> > > ('str' type is not callable) is confusing me.
> > > def move(roll):
> > > return 'Y
On Jul 2, 11:08 am, John Salerno wrote:
> On Jul 2, 12:33 pm, MRAB wrote:
>
>
>
> > On 02/07/2011 17:56, John Salerno wrote:
>
> > > I thought I had finally grasped decorators, but the error I'm getting
> > > ('str' type is not callable) is confusing me.
> > > def move(roll):
> > > return 'Y
On Jul 2, 11:08 am, John Salerno wrote:
> On Jul 2, 12:33 pm, MRAB wrote:
>
>
>
> > On 02/07/2011 17:56, John Salerno wrote:
>
> > > I thought I had finally grasped decorators, but the error I'm getting
> > > ('str' type is not callable) is confusing me.
> > > def move(roll):
> > > return 'Y
On Jan 1, 5:59 pm, Josh English wrote:
> I have hit yet another wall. I am dynamically creating a class and then
> creating instances of that class. The class relies on a second class to store
> a list of objects. (This is simplified from the the original by a factor of
> about 20. The real pro
On Dec 24, 8:24 am, kj wrote:
> I want to implement a frozen and ordered dict.
>
> I thought I'd implement it as a subclass of collections.OrderedDict
> that prohibits all modifications to the dictionary after it has
> been initialized.
>
> In particular, calling this frozen subclass's update meth
11 matches
Mail list logo