Re: what¢s the difference between socket.send()and socket.sendall() ?
On Mon, 07 Jan 2013 18:35:20 +0800, iMath wrote:
> <p class="MsoNormal"><tt><span lang="EN-US" style="font-size: 12pt;
> color: white; background-color: rgb(68, 110, 248); background-position:
> initial initial; background-repeat: initial initial; ">whatâ€™s the
> difference between socket</span></tt><tt><span lang="EN-US"
> style="font-size: 12pt; ">.send() and <span style="color: white;
> background-color: rgb(68, 110, 248); background-position: initial
> initial; background-repeat: initial initial; ">socket</span>.sendall()
> ?</span></tt> </p>
Please re-send your question as text, instead of as HTML (so-called "rich
text"). Since many people are reading this forum via Usenet, sending HTML
is considered abusive. This is a text newsgroup, not a binary newsgroup.
If you *must* use a client that sends HTML, please make sure that it
ALWAYS sends a plain text version of your message as well. But here are
eight reasons you should not rely on fancy formatting (colours, fonts,
bold, etc.) in text-based media such as email (or news):
- HTML code in email is one of the top 3 signs of spam. Many people
send "rich text" email straight to the trash as a way of eliminating
- HTML code in email is a privacy and security risk. For example,
that means that the sender can track whether or not you have read
the email using "web bugs" whether or not you consent to being
tracked. There are viruses, spyware and other malware that can be
transmitted through HTML code in email. For this reason, many
people filter HTML email straight to the trash.
- HTML code forces your choice in font, font size, colours, etc. on
the reader. Some people prefer to read emails using their own
choice of font rather than yours, and consider it rude for others
to try to force a different font. Sending white text on coloured
background is especially nasty, because it hurts readability of
even for people with perfect vision.
- Even if readers don't mind the use of "rich text" in principle, in
practice once they have received enough emails with pink text on a
purple and yellow background with blinking stars and dancing fairies
all over the page, in pure self-defence they may disable or delete
- Use of colour for emphasis discriminates against the approximately
10% of the male population who are colour-blind.
- Use of italics or other formatting may discriminate against those
who are blind and using screen readers to "read" their email. I
once was on a maths mailing list for about three years before I
realised that the most prolific and helpful person there was as
blind as a bat.
- Programming is a *text-based* activity. Code depends on WHAT you
write, not its colour, or the font you use, or whether there are
smiley faces in the background winking at you. So especially in
programming circles, many people find HTML code in emails to be a
distraction and an annoyance. Being able to express yourself in
plain text without colours and fonts is a good practice for any
programmer to get used to.
- Even if you think that people who dislike HTML emails are wrong, or
silly, or being precious, or completely nuts, nevertheless you should
indulge us. You are asking for free advice. It does not pay for you to
offend or annoy those you are asking for help.
(Apologies to anyone on the "tutor" mailing list who has already seen
this message earlier today.)
Re: what’s the difference between socket.send() and socket.sendall() ?
On Tue, Jan 8, 2013 at 2:28 AM, Steven D'Aprano
> once was on a maths mailing list for about three years before I
> realised that the most prolific and helpful person there was as
> blind as a bat.
And that, I think, is what s/he would have most wanted: three years
(more, most likely) without any sort of special treatment. It's all
very well to talk about anti-discrimination laws, but on the internet,
nobody knows you're a bat, if I can mangle that expression without
offending people. We have some excellent people on a couple of MUDs
I'm on who are, similarly, blind and using screen-readers. Again, you
don't even know that that's the case until/unless a question comes out
about some piece of ASCII art (which there's a very VERY little of in
Threshold), or some client-specific question hints at the fact that
s/he is using one of the reader-friendly clients (which are fairly
ugly to the sighted).
As to the use of color for emphasis, though - I don't think the OP
used it like that. I've no idea what the significance of white-on-blue
words was, there; it completely eludes me. Maybe he was sending a
secret message in the color codes? In any case, Steven's eight reasons
are absolutely right; when HTML code isn't adding information, it
should be stripped, and when it is adding information, you risk a
large proportion of people not seeing it. So there's never a good time
to use HTML.
|All times are GMT. The time now is 08:52 PM.|
Powered by vBulletin®. Copyright ©2000 - 2013, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.