Re: Membership of multiple items to a list

2009-02-02 Thread Stephen Hansen

On Sun, Feb 1, 2009 at 7:47 PM, Ben Finney bignose+hates-s...@benfinney.id.au 
wrote:

rdmur...@bitdance.com writes:


I don't even see Stephen Hansen's posts. My newsreader just shows
the header and says [HTML part not displayed].


Likewise.


Yeah, I know HTML is bad on newsgroups. I didn't realize that when I installed 
FireGPG to sign messages while in Gmail that it started handling my html/plain 
text content differently.

Oops.

That said: Is S/MIME / OpenPGP readable on these various clients? There's no 
HTML, the text body is just encoded in base64.

I haven't actually subscribed to a usenet newsgroup in eons upon eons. 


If its not readable as S/MIME then I'll switch to inline PGP... that's just a 
slightly terrible solution for other places I have to talk and I'll have to 
take extra care to remember to manually check the settings based upon where I'm 
talking.

I'm re-sending this same message as the OpenPGP S/MIME attachment format -- 
just so test if its actually readable by news clients in general. I have 
absolutely no idea. Not touched a news client in years and years, as I said.

Sorry for the inconvenience. 


--Stephen

signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread Stephen Hansen
On Sun, Feb 1, 2009 at 7:47 PM, Ben Finney
bignose+hates-s...@benfinney.id.au wrote:
 rdmur...@bitdance.com writes:

 I don't even see Stephen Hansen's posts. My newsreader just shows
 the header and says [HTML part not displayed].

 Likewise.

Yeah, I know HTML is bad on newsgroups. I didn't realize that when I
installed FireGPG to sign messages while in Gmail that it started
handling my html/plain text content differently.

Oops.

That said: Is S/MIME / OpenPGP readable on these various clients?
There's no HTML, the text body is just encoded in base64.

I haven't actually subscribed to a usenet newsgroup in eons upon eons.

If its not readable as S/MIME then I'll switch to inline PGP... that's
just a slightly terrible solution for other places I have to talk and
I'll have to take extra care to remember to manually check the
settings based upon where I'm talking.

I'm re-sending this same message as the OpenPGP S/MIME attachment
format -- just so test if its actually readable by news clients in
general. I have absolutely no idea. Not touched a news client in years
and years, as I said.

Sorry for the inconvenience.

--Stephen
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread Peter Pearson
Sorry to whine, but here's how this looks on slrn:

On Mon, 2 Feb 2009 00:24:19 -0800 (PST), Stephen Hansen wrote:
 This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
 ---firegpg072eqfqovlg25y5x7pu7mz3
 Content-Type: text/plain; format=flowed; charset=UTF-8
 Content-Transfer-Encoding: base64

 T24gU3VuLCBGZWIgMSwgMjAwOSBhdCA3OjQ3IFBNLCBCZW4gRmlubmV5IDxiaWdub3NlK2hhdGVz
[many similarly informative lines omitted]
 cnJ5IGZvciB0aGUgaW5jb252ZW5pZW5jZS4gDQoNCi0tU3RlcGhlbg==
 ---firegpg072eqfqovlg25y5x7pu7mz3
 Content-Type: application/pgp-signature; name=signature.asc
 Content-Description: OpenPGP digital signature
 Content-Disposition: attachment; filename=signature.asc


 ---firegpg072eqfqovlg25y5x7pu7mz3--


-- 
To email me, substitute nowhere-spamcop, invalid-net.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread Duncan Booth
Stephen Hansen apt.shan...@gmail.com wrote:

 I'm re-sending this same message as the OpenPGP S/MIME attachment
 format -- just so test if its actually readable by news clients in
 general. I have absolutely no idea. Not touched a news client in years
 and years, as I said. 

It is readable in XNews, but only displays in a fixed pitch font and 
without colours to distinguish the quoted content.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread Stephen Hansen
On Mon, Feb 2, 2009 at 10:21 AM, Duncan Booth
duncan.bo...@invalid.invalidwrote:

 Stephen Hansen apt.shan...@gmail.com wrote:

  I'm re-sending this same message as the OpenPGP S/MIME attachment
  format -- just so test if its actually readable by news clients in
  general. I have absolutely no idea. Not touched a news client in years
  and years, as I said.

 It is readable in XNews, but only displays in a fixed pitch font and
 without colours to distinguish the quoted content.


Yeah, I gave up. I was hoping to find one common set of settings that worked
in all contexts I use this email account for, but failed :)

Oh well.

Sorry for sending junk. :) And going off-topic here. Ahem.

--S
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread Steve Holden
Stephen Hansen wrote:
 On Sun, Feb 1, 2009 at 7:47 PM, Ben Finney
 bignose+hates-s...@benfinney.id.au wrote:
 rdmur...@bitdance.com writes:

 I don't even see Stephen Hansen's posts. My newsreader just shows
 the header and says [HTML part not displayed].

 Likewise.
 
 Yeah, I know HTML is bad on newsgroups. I didn't realize that when I
 installed FireGPG to sign messages while in Gmail that it started
 handling my html/plain text content differently.
 
 Oops.
 
 That said: Is S/MIME / OpenPGP readable on these various clients?
 There's no HTML, the text body is just encoded in base64.
 
 I haven't actually subscribed to a usenet newsgroup in eons upon eons.
 If its not readable as S/MIME then I'll switch to inline PGP... that's
 just a slightly terrible solution for other places I have to talk and
 I'll have to take extra care to remember to manually check the settings
 based upon where I'm talking.
 
Or configure multiple personalities with the same email address but
different settings, so all you have to do is switch personalities
appropriately.

 I'm re-sending this same message as the OpenPGP S/MIME attachment format
 -- just so test if its actually readable by news clients in general. I
 have absolutely no idea. Not touched a news client in years and years,
 as I said.
 
 Sorry for the inconvenience.

I run Thunderbird with the OpenPGP add-on, and I hadn't noticed anything
at all strange about your posts :).

regards
 Steve
-- 
Steve Holden+1 571 484 6266   +1 800 494 3119
Holden Web LLC  http://www.holdenweb.com/

--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread D'Arcy J.M. Cain
On Mon, 02 Feb 2009 17:34:51 -0500
Steve Holden st...@holdenweb.com wrote:
 Or configure multiple personalities with the same email address but
 different settings, so all you have to do is switch personalities
 appropriately.

They have pills for that now.

-- 
D'Arcy J.M. Cain da...@druid.net |  Democracy is three wolves
http://www.druid.net/darcy/|  and a sheep voting on
+1 416 425 1212 (DoD#0082)(eNTP)   |  what's for dinner.
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-02 Thread rdmurray
My client can handle your Mime and shows me the text part of the signed
message.  It's not as pretty as just seeing an unsigned text message,
but that's a client problem, not yours :)

I would like to think that all newsreader clients could handle mime at
this point, but who knows.

--RDM

--
http://mail.python.org/mailman/listinfo/python-list


Membership of multiple items to a list

2009-02-01 Thread inkhorn
Dear all,

I'd like to know how to elegantly check a list for the membership of
any of its items to another list.  Not caring for elegance, I would
use the following code:

blah = [1,2,3]
yadda = [3,4,5,6]

blah[0] or blah[1] or blah[2] in yadda

Please tell me how to change the preceding code into something nicer
where I don't have to keep extending the line based on the length of
the first list.

Cheers,
Matt Dubins
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread Christian Heimes
inkhorn schrieb:
 Dear all,
 
 I'd like to know how to elegantly check a list for the membership of
 any of its items to another list.  Not caring for elegance, I would
 use the following code:
 
 blah = [1,2,3]
 yadda = [3,4,5,6]
 
 blah[0] or blah[1] or blah[2] in yadda
 
 Please tell me how to change the preceding code into something nicer
 where I don't have to keep extending the line based on the length of
 the first list.

You can and should use Python's set type for membership testing.

 blah = set([1,2,3])
 yadda = set([3,4,5,6])
 blah.issubset(yadda)
False
 blah.difference(yadda)
set([1, 2])
 blah.symmetric_difference(yadda)
set([1, 2, 4, 5, 6])

Christian

--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread Stephen Hansen

I'd like to know how to elegantly check a list for the membership of
any of its items to another list. Not caring for elegance, I would
use the following code:
That's one of the useful properties of sets: a = [1,2,3] b = [3,4,5,6] set(a)  set(b)set([3]) set(a).intersection(b)set([3])
That's two spellings of the same thing. As for testing: an empty set like an empty list will return false, so "if set(a)  set(b):" will be true or false based on if there's any commonalities between the two lists.--Stephen



signature.asc
Description: OpenPGP digital signature
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread Paul Rubin
inkhorn matt.dub...@sympatico.ca writes:
 blah = [1,2,3]
 yadda = [3,4,5,6]
 
 blah[0] or blah[1] or blah[2] in yadda

if set(blah)  set(yadda): print yes
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread inkhorn
Wow thanks for the lightning fast reply!  This does exactly the right
job.

Matt

On Feb 1, 3:01 pm, Stephen Hansen apt.shan...@gmail.com wrote:
 I'd like to know how to elegantly check a list for the membership of
 any of its items to another list.  Not caring for elegance, I would
 use the following code:
 That's one of the useful properties of sets:
  a = [1,2,3]
  b = [3,4,5,6]
  set(a)  set(b)
 set([3])
  set(a).intersection(b)
 set([3])
 That's two spellings of the same thing. As for testing: an empty set like an 
 empty list will return false, so if set(a)  set(b): will be true or false 
 based on if there's any commonalities between the two lists.
 --Stephen

  signature.asc
  1KViewDownload

--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread Steven D'Aprano
On Sun, 01 Feb 2009 12:01:11 -0800, Stephen Hansen wrote:

 brdiv class=gmail_quoteblockquote class=gmail_quote
 style=border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt
 0.8ex; padding-left: 1ex;br I'd like to know how to elegantly check
 a list for the membership ofbr any of its items to another list.
 nbsp;Not caring for elegance, I wouldbr use the following code:br
 /blockquotedivbrThat's one of the useful properties of
 sets:brbrgt;gt;gt; a = [1,2,3]brgt;gt;gt; b =
 [3,4,5,6]brgt;gt;gt; set(a) amp;
 set(b)brset([3])brgt;gt;gt;
 set(a).intersection(b)brset([3])br brThat's two spellings of the
 same thing. As for testing: an empty set like an empty list will return
 false, so if set(a) amp; set(b): will be true or false based on if
 there's any commonalities between the two
 lists.brbr--Stephen/div/divbr


Stephen, do you see the utter mess your posts look like to some others?

Please ensure you send plain text messages to Usenet, not HTML. If you 
absolutely can't avoid using an insecure and bloated page layout language 
instead of text, please ensure that your News or mail client is set to 
send plain text as well as HTML.

If your news/mail client doesn't follow Usenet standards, then (1) change 
the application you use to one that does; or (2) complain to the vendor 
until they fix their product.


Thank you,



-- 
Steven
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread rdmurray
Quoth Steven D'Aprano ste...@remove.this.cybersource.com.au:
 On Sun, 01 Feb 2009 12:01:11 -0800, Stephen Hansen wrote:
 
  brdiv class=gmail_quoteblockquote class=gmail_quote
  style=border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt
  0.8ex; padding-left: 1ex;br I'd like to know how to elegantly check
  a list for the membership ofbr any of its items to another list.
  nbsp;Not caring for elegance, I wouldbr use the following code:br
  /blockquotedivbrThat's one of the useful properties of
  sets:brbrgt;gt;gt; a = [1,2,3]brgt;gt;gt; b =
  [3,4,5,6]brgt;gt;gt; set(a) amp;
  set(b)brset([3])brgt;gt;gt;
  set(a).intersection(b)brset([3])br brThat's two spellings of the
  same thing. As for testing: an empty set like an empty list will return
  false, so if set(a) amp; set(b): will be true or false based on if
  there's any commonalities between the two
  lists.brbr--Stephen/div/divbr
 
 
 Stephen, do you see the utter mess your posts look like to some others?

I don't even see Stephen Hansen's posts.  My newsreader just shows the
header and says [HTML part not displayed].

--RDM

--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread Stephen Hansen
 Stephen, do you see the utter mess your posts look like to some others?

Whoops, I was experimenting with a new Firefox add-on that fiddled
with Gmail, and hadn't noticed it changed my output format to HTML out
from under me.

Sorry!

--S
--
http://mail.python.org/mailman/listinfo/python-list


Re: Membership of multiple items to a list

2009-02-01 Thread Ben Finney
rdmur...@bitdance.com writes:

 I don't even see Stephen Hansen's posts. My newsreader just shows
 the header and says [HTML part not displayed].

Likewise.

Note to people who want to communicate in online fora: Set your client
to generate a “text/plain” body only. HTML is either irrelevant to
your message (so don't generate it), or will result in your message
not even being seen at all by some readers (as in this case).

-- 
 \“If it ain't bust don't fix it is a very sound principle and |
  `\  remains so despite the fact that I have slavishly ignored it |
_o__) all my life.” —Douglas Adams |
Ben Finney
--
http://mail.python.org/mailman/listinfo/python-list