Path: csiph.com!usenet.pasdenom.info!news.etla.org!news.stack.nl!newsfeed.xs4all.nl!newsfeed3.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.007 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'static': 0.04; 'subject:PEP': 0.07; 'args)': 0.09; 'implements': 0.09; 'translate': 0.10; '-tkc': 0.16; 'filename:fname piece:signature': 0.16; 'from:addr:python.list': 0.16; 'from:addr:tim.thechases.com': 0.16; 'from:name:tim chase': 0.16; 'java.': 0.16; 'wrote:': 0.18; 'java': 0.24; "i've": 0.25; 'subject: : ': 0.26; 'van': 0.27; 'header:In-Reply-To:1': 0.27; 'skip:( 20': 0.30; 'void': 0.31; 'class': 0.32; 'skip:u 20': 0.35; 'something': 0.35; 'mass': 0.36; 'charset:us-ascii': 0.36; 'to:addr:python-list': 0.38; 'to:addr:python.org': 0.39; 'new': 0.61; 'received:50.22': 0.84; 'touched': 0.84; 'albert': 0.91 Date: Sat, 17 May 2014 08:28:24 -0500 From: Tim Chase To: python-list@python.org Subject: Re: PEP 8 : Maximum line Length : In-Reply-To: <53775b9c$0$27160$e4fe514c@dreader35.news.xs4all.nl> References: <51ad8928-619c-4e9c-b66f-15bd4a2a8124@googlegroups.com> <53775b9c$0$27160$e4fe514c@dreader35.news.xs4all.nl> X-Mailer: Claws Mail 3.8.1 (GTK+ 2.24.10; x86_64-pc-linux-gnu) Importance: low X-Priority: 4 (Low) Mime-Version: 1.0 Content-Type: multipart/signed; micalg=PGP-SHA512; boundary="Sig_/.35mbUchx3NZpQsL=f4ga+Y"; protocol="application/pgp-signature" X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - boston.accountservergroup.com X-AntiAbuse: Original Domain - python.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - tim.thechases.com X-Get-Message-Sender-Via: boston.accountservergroup.com: authenticated_id: tim@thechases.com X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 60 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1400333338 news.xs4all.nl 2924 [2001:888:2000:d::a6]:39288 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:71685 --Sig_/.35mbUchx3NZpQsL=f4ga+Y Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable On 2014-05-17 12:52, Albert van der Horst wrote: > Now translate E=3Dmc^2 into Java. I suspect it would be something like public class Einstein { private double mass=3D0, energy=3D0; public class Relativity implements IEquation { Relativity(double mass) { set_mass(mass); } public double getEnergy() {return energy;} public double setEnergy(double newEnergy) { energy =3D newEnergy; mass =3D newEnergy / (units.SPEED_OF_LIGHT * units.SPEED_OF_LIGHT); } public double get_mass() {return mass;} public double setMass(double newMass) { mass =3D newMass; energy =3D newMass * (units.SPEED_OF_LIGHT * units.SPEED_OF_LIGHT); } } =20 public static void main(String[] args) { Relativity relativity =3D new Relativity( Integer.parseInt(args[1]) ); System.out.println(relativity.getEnergy()) } } (untested, as it has been a long time since I've touched any Java code) -tkc --Sig_/.35mbUchx3NZpQsL=f4ga+Y Content-Type: application/pgp-signature; name=signature.asc Content-Disposition: attachment; filename=signature.asc -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) iQEcBAEBCgAGBQJTd2P4AAoJEN385Nh6n9aQ3eAH/12GjuGUhgpfCcicduyDyxqP PgOobk5zg1bB7kDzWjVTqLH7iLEnCMnGYmJ143uhie4GiAH7fxlmShmka4zrPCwl 3ynaVdZeBNYFFhD6pnV7XTzlKsxbNaUaAFjNCFdqtcHNb/CatEQxduLd3PRWXeoT lBcds1UxdJ8OWENYgC1d5CSTyrKZ9AwRs+0OeZmpZALcaGTiEK5QtMcpHWrk7MSP wWxd8iVoVq005Zlchf2qA9tlaAJ5IMdI5hFm0PLjLgJNjh/RpnoCMrWwWF687NBg I3TwwgcoqJ4V/BuXdRbMv1tTauGF4jeYAhaceIXKQaIBkjZJ3Aw54d8YkirWei0= =AdYT -----END PGP SIGNATURE----- --Sig_/.35mbUchx3NZpQsL=f4ga+Y--