"convert" string to bytes without changing data (encoding)

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Mar 30 03:16:22 CEST 2012


On Thu, 29 Mar 2012 11:30:19 -0400, Ross Ridge wrote:

> Steven D'Aprano  <steve+comp.lang.python at pearwood.info> wrote:
>>Your reaction is to make an equally unjustified estimate of Evan's
>>mindset, namely that he is not just wrong about you, but *deliberately
>>and maliciously* lying about you in the full knowledge that he is wrong.
> 
> No, Evan in his own words admitted that his post was ment to be harsh,
> "a bit harsher than it deserves", showing his malicious intent.

Being harsher than it deserves is not synonymous with malicious. You are 
making assumptions about Evan's mental state that are not supported by 
the evidence. Evan may believe that by "punishing" (for some feeble sense 
of punishment) you harshly, he is teaching you better behaviour that will 
be to your own benefit; or that it will act as a warning to others. 
Either way he may believe that he is actually doing good. 

And then he entirely undermined his own actions by admitting that he was 
over-reacting. This suggests that, in fact, he wasn't really motivated by 
either malice or beneficence but mere frustration.

It is quite clear that Evan let his passions about writing maintainable 
code get the best of him. His rant was more about "people like you" than 
you personally.

Evan, if you're reading this, I think you owe Ross an apology for flying 
off the handle. Ross, I think you owe Evan an apology for unjustified 
accusations of malice.


> He made
> accusations that where neither supported by anything I've said 

Now that is not actually true. Your posts have defended the idea that 
copying the raw internal byte representation of strings is a reasonable 
thing to do. You even claimed to know how to do so, for any version of 
Python (but so far have ignored my request for you to demonstrate).


> in this
> thread nor by the code I actually write.  His accusation about me were
> completely made up, he was not telling the truth and had no reasonable
> basis to beleive he was telling the truth.  He was malicously lying and
> I'm completely justified in saying so.

No, they were not completely made up. Your posts give many signs of being 
somebody who might very well write code to the implementation rather than 
the interface. Whether you are or not is a separate question, but your 
posts in this thread indicate that you very likely could be.

If this is not the impression you want to give, then you should 
reconsider your posting style.

Ross, to be frank, your posting style in this thread has been cowardly 
and pedantic, an obnoxious combination. Please take this as constructive 
criticism and not an attack -- you have alienated people in this thread, 
leading at least one person to publicly kill-file your future posts. I 
choose to assume you aren't aware of why that is than that you are doing 
so deliberately.

Without actually coming out and making a clear, explicit statement that 
you approve or disapprove of the OP's attempt to use implementation 
details, you *imply* support without explicitly giving it; you criticise 
others for saying it can't be done without demonstrating that it can be 
done. If this is a deliberate rhetorical trick, then shame on you for 
being a coward without the conviction to stand behind concrete 
expressions of your opinion. If not, then you should be aware that you 
are using a rhetorical style that will make many people predisposed to 
think you are a twat.

You *might* have said 

    Guys, you're technically wrong about this. This is how you can
    retrieve the internal representation of a string as a sequence
    of bytes: ...code... but you shouldn't use this in production 
    code because it is fragile and depends on implementation details 
    that may break in PyPy and Jython and IronPython.

But you didn't.

You *might* have said 

    Wrong, you can convert a string into a sequence of bytes without
    encoding or decoding: ...code... but don't do this.

But you didn't.

Instead you puffed yourself up as a big shot who was more technically 
correct than everyone else, but without *actually* demonstrating that you 
can do what you said you can do. You labelled as "bullshit" our attempts 
to discourage the OP from his misguided approached.

If your intention was to put people off-side, you succeeded very well. If 
not, you should be aware that you have, and consider how you might avoid 
this in the future.



-- 
Steven



More information about the Python-list mailing list