How to convert a number to binary?

Cameron Laird claird at lairds.us
Sat May 19 21:07:32 EDT 2007


In article <1179474720.810650.10510 at l77g2000hsb.googlegroups.com>,
Lyosha  <lyoshaM at gmail.com> wrote:
			.
			.
			.
>While I agree with this general statement, I think remembering a
>particular one-liner to convert a number to a binary is more valuable
>to my brain than remembering where I placed the module that contains
>this function.
>
>I needed the one-liner not to save disk space or screen lines.  It's
>to save time, should I need to convert to binary when doing silly
>little experiments.  I would spend more time getting the module
>wherever it is I stored it (and rewriting it if it got lost).
>
>It's fun, too.

I know the feeling.

In fact, there's a point here that's deep enough to deserve a follow-up.
Various people, including, I think, the timbot, have said that the 
distinction of a good high-level language is code NON-re-use; that is,
in the positive aspect, a language like Python is so expressive and 
productive that it makes it generally easier to re-use *ideas* than code.



More information about the Python-list mailing list