Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #71685
| 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 | <python.list@tim.thechases.com> |
| 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 <python.list@tim.thechases.com> |
| To | python-list@python.org |
| Subject | Re: PEP 8 : Maximum line Length : |
| In-Reply-To | <53775b9c$0$27160$e4fe514c@dreader35.news.xs4all.nl> |
| References | <CACT3xuWxJHqqV26R+3aYvpovRs7OZ6_TFynSVV-n-b+EkMmtKA@mail.gmail.com> <mailman.9952.1399970767.18130.python-list@python.org> <51ad8928-619c-4e9c-b66f-15bd4a2a8124@googlegroups.com> <mailman.10041.1400164039.18130.python-list@python.org> <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 <python-list.python.org> |
| List-Unsubscribe | <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe> |
| List-Archive | <http://mail.python.org/pipermail/python-list/> |
| List-Post | <mailto:python-list@python.org> |
| List-Help | <mailto:python-list-request@python.org?subject=help> |
| List-Subscribe | <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.10085.1400333338.18130.python-list@python.org> (permalink) |
| 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 |
Show key headers only | View raw
[Multipart message — attachments visible in raw view] - view raw
On 2014-05-17 12:52, Albert van der Horst wrote:
> Now translate E=mc^2 into Java.
I suspect it would be something like
public class Einstein {
private double mass=0, energy=0;
public class Relativity implements IEquation {
Relativity(double mass) {
set_mass(mass);
}
public double getEnergy() {return energy;}
public double setEnergy(double newEnergy) {
energy = newEnergy;
mass = newEnergy / (units.SPEED_OF_LIGHT * units.SPEED_OF_LIGHT);
}
public double get_mass() {return mass;}
public double setMass(double newMass) {
mass = newMass;
energy = newMass * (units.SPEED_OF_LIGHT * units.SPEED_OF_LIGHT);
}
}
public static void main(String[] args) {
Relativity relativity = 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
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: PEP 8 : Maximum line Length : Peter Otten <__peter__@web.de> - 2014-05-13 10:45 +0200
Re: PEP 8 : Maximum line Length : Rustom Mody <rustompmody@gmail.com> - 2014-05-13 06:18 -0700
Re: PEP 8 : Maximum line Length : wxjmfauth@gmail.com - 2014-05-15 07:17 -0700
Re: PEP 8 : Maximum line Length : Chris Angelico <rosuav@gmail.com> - 2014-05-16 00:27 +1000
Re: PEP 8 : Maximum line Length : wxjmfauth@gmail.com - 2014-05-15 08:48 -0700
Re: PEP 8 : Maximum line Length : albert@spenarnc.xs4all.nl (Albert van der Horst) - 2014-05-17 12:52 +0000
Re: PEP 8 : Maximum line Length : Chris Angelico <rosuav@gmail.com> - 2014-05-17 23:18 +1000
Re: PEP 8 : Maximum line Length : Roy Smith <roy@panix.com> - 2014-05-17 09:49 -0400
Re: PEP 8 : Maximum line Length : Tim Chase <python.list@tim.thechases.com> - 2014-05-17 08:28 -0500
Re: PEP 8 : Maximum line Length : Roy Smith <roy@panix.com> - 2014-05-17 09:46 -0400
Re: PEP 8 : Maximum line Length : Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-17 15:02 +0100
Re: PEP 8 : Maximum line Length : Roy Smith <roy@panix.com> - 2014-05-17 10:06 -0400
Re: PEP 8 : Maximum line Length : Mark Lawrence <breamoreboy@yahoo.co.uk> - 2014-05-17 15:21 +0100
Re: PEP 8 : Maximum line Length : Rustom Mody <rustompmody@gmail.com> - 2014-05-17 10:46 -0700
csiph-web