On 29Mar2023 08:17, Loris Bennett wrote:
I am glad to hear that I am not alone :-) However, my use-case is fairly
trivial, indeed less complicated than yours. So, in truth I don't
really need a Period class. I just thought it might be a sufficiently
generic itch that someone else with a more c
On 30Mar2023 10:13, Cameron Simpson wrote:
I do in fact have a `TimePartition` in my timeseries module; it
presently doesn't do comparisons because I'm not comparing them - I'm
just using them as slices into the timeseries data on the whole.
https://github.com/cameron-simpson/css/blob/0ade6d1
On 3/29/2023 2:17 AM, Loris Bennett wrote:
I am glad to hear that I am not alone :-) However, my use-case is fairly
trivial, indeed less complicated than yours. So, in truth I don't
really need a Period class. I just thought it might be a sufficiently
generic itch that someone else with a more
Cameron Simpson writes:
> On 28Mar2023 08:05, Dennis Lee Bieber wrote:
>> So far, you seem to be the only person who has ever asked for
>> asingle
>>entity incorporating an EPOCH (datetime.datetime) + a DURATION
>>(datetime.timedelta).
>
> But not the only person to want one. I've got a
On 28Mar2023 08:05, Dennis Lee Bieber wrote:
So far, you seem to be the only person who has ever asked for a
single
entity incorporating an EPOCH (datetime.datetime) + a DURATION
(datetime.timedelta).
But not the only person to want one. I've got a timeseries data format
where (within a fi
1. Is there a standard class for a 'period', i.e. length of time
specified by a start point and an end point? The start and end
points could obviously be datetimes and the difference a timedelta,
but the period '2022-03-01 00:00 to 2022-03-02 00:00' would be
diff
rt would be defining those operations, and as
the OP says, it doesn't seem to me like there is an obvious definition
for many of them.
If there's no obvious common definition for what a class is supposed
to do, then there can't really be a standard one...
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list
epoch, January 2022 is obviously different
to January 2023, even thought the duration might be the same. I am just
surprised that there is no standard Period class, with which I could
create objects and then be able to sort, check for identity, equality of
length, amount of overlap, etc. I suppose
On 2023-03-28, Dennis Lee Bieber wrote:
> So far, you seem to be the only person who has ever asked for a
> single entity incorporating an EPOCH (datetime.datetime) + a
> DURATION (datetime.timedelta).
It seems to me that tuple of two timdate objects (start,end) is the
more obvious representatio
> No, it doesn't. I already know about timedelta. I must have explained
> the issue badly, because everyone seems to be fixating on the
> formatting, which is not a problem and is incidental to what I am really
> interested in, namely:
>
> 1. Is there a standard class for
On Tue, 28 Mar 2023 15:11:14 +0200, Loris Bennett wrote:
> But even if I have a single epoch, January 2022 is obviously different
> to January 2023, even thought the duration might be the same. I am just
> surprised that there is no standard Period class, with which I could
> create
idental to what I am really
>interested in, namely:
>
>1. Is there a standard class for a 'period', i.e. length of time
> specified by a start point and an end point? The start and end
> points could obviously be datetimes and the difference a timedelta,
> but the
edelta should give the OP exactly what he's talking
> about.
No, it doesn't. I already know about timedelta. I must have explained
the issue badly, because everyone seems to be fixating on the
formatting, which is not a problem and is incidental to what I am really
interested in, namely:
gt;>formatting, which is not a problem and is incidental to what I am really
>>interested in, namely:
>>
>>1. Is there a standard class for a 'period', i.e. length of time
>> specified by a start point and an end point? The start and end
>> points coul
On 3/27/2023 11:34 AM, rbowman wrote:
On Mon, 27 Mar 2023 15:00:52 +0200, Loris Bennett wrote:
I need to deal with what I call a 'period', which is a span of time
limited by two dates, start and end. The period has a 'duration',
which is the elapsed time between start and end. The d
The Python standard library module datetime seems to be what you want.
It has objects representing date/times, and deltatimes (i.e.,
durations). These can be timezone aware or not as you wish.
Dr. Gary Herron
Professor of Computer Science
DigiPen Institute of Technology
On 3/27/23 6:00 AM
On Mon, 27 Mar 2023 15:00:52 +0200, Loris Bennett wrote:
> I need to deal with what I call a 'period', which is a span of time
> limited by two dates, start and end. The period has a 'duration',
> which is the elapsed time between start and end. The duration is
> essentially a number of
atetime_1 = datetime.strptime( '2023-03-27T14:27:23+01:00', format )
>
> print( datetime_1 - datetime_0 )
>
> sys.stdout
>
> 0:26:31
>
> . Days will also be shown if greater than zero.
Thanks for the examples, but I am not really interested in how to write
a b
s, I would generally want to display
the duration in a format such as "dd-hh:mm:ss"
My (possibly ill-founded) expectation:
There is a standard class which encapsulates this sort of functionality.
My (possibly insufficiently researched) conclusion:
Such a standard class does not exis
o detailed here about that difference between stdout and stderr
> because in the wild (e.g. on StackOverflow) you often find "use logging
> log levels" as a solution for that problem, which IMHO isn't one.
>
> Now the question:
> From my research on the docs it seems
On 1/4/23, c.bu...@posteo.jp wrote:
>
> often seen "--verbose" switch in command line applications should
> affect only the messages given to the users. This means messages on
> "stdout". That is what this question is about.
Is this additional context information such as help and definitions?
If
ser.parse_args()
logger = logging.getLogger(__name__)
logger.setLevel(getattr(logging,args.loglevel))
From: Python-list on
behalf of c.bu...@posteo.jp
Date: Wednesday, January 4, 2023 at 8:55 AM
To: python-list@python.org
Subject: No solution for "--verbose" (on stdout) output in Pythonds sta
On Thu, 5 Jan 2023 at 00:54, wrote:
>
> Hello,
>
> first I have to say that in my current and fresh humble opinion the
> often seen "--verbose" switch in command line applications should
> affect only the messages given to the users. This means messages on
> "stdout". That is what this question is
uot; as a solution for that problem, which IMHO isn't one.
Now the question:
>From my research on the docs it seems there is no feature in the
standard library which could help me to implement "--verbose" or
multiple verbosity levels like "-vvv"?
I found some workar
> > https://mail.python.org/mailman/listinfo/python-list
> >
>
>
> --
> Psss, psss, put it down! - http://www.cafepress.com/putitdown
First of all, thank you a lot Fetchinson, it helped on my system (Centos 6) to
today recompile the newest Python (3.10.7)!
Of course I
w resolver.
> Is there a way to suppress it? We have some back end operations that fail
> when we get output on standard error, and they're dying from that notice.
--
---
punkt.de GmbH
Lars Liedtke
.infrastructure
Kaiserallee 13a
76133 Karlsruhe
Tel. +49 721 9109 500
https://infra
ere a way to suppress it? We have some back end operations that fail when
we get output on standard error, and they're dying from that notice.
--
https://mail.python.org/mailman/listinfo/python-list
On 9/7/2019 5:51 AM, ast wrote:
'C:\\Program Files\\Python36-32\\lib\\site-packages']
The last path is used as a location to store libraries
you install yourself.
If I am using a virtual environment (with venv) this last
path is different
'C:\\Users\\jean-marc\\Desktop\\myenv\\lib\\site-packa
ipt
directory.
> 'C:\\Users\\jean-marc\\Desktop\\python',
Probably this directory is in your %PYTHONPATH% environment variable,
which gets inserted here, normally ahead of everything else except for
the script directory.
> 'C:\\Program Files\\Python36-32\\python36.zip',
ast writes:
> I looked for windows environment variables to tell python
> how to fill sys.path at startup but I didn't found.
>
> So how does it work ?
Read the (so called) docstring at the beginning of the module
"site.py".
Either locate the module source in the file system
and read it in an ed
Hello
List sys.path contains all paths where python shall
look for libraries.
Eg on my system, here is the content of sys.path:
>>> import sys
>>> sys.path
['',
'C:\\Users\\jean-marc\\Desktop\\python',
'C:\\Program Files\\Python36-32\\python36.zip',
'C:\\Program Files\\Python36-32\\DLLs',
'C:\\
On 30/07/2019 10.06, dmitre...@gmail.com wrote:
> Hello,
>
> is Python capable of generating a email form (from standard data - address,
> topic, string message) with raising it by a default OS email client, e.g.
> Thunderbird? User would like to have a possibility to revi
Hello,
is Python capable of generating a email form (from standard data - address,
topic, string message) with raising it by a default OS email client, e.g.
Thunderbird? User would like to have a possibility to review/modify email
content inside the OS email client window before sending it
ewer version is needed". I searched on
> conda, etc. and can't find it and finally realized that 2.4 meant Python
> 2.4, not re 2.4. (The 3.7 docs have lines like "Changed in version 3.7".)
>
> My question to the pros here is what purpose do the __version__/version
&
The point of the "Changed in version ..." or "New in version ..." bits
in the documentation is to alert readers who maintain software which
needs to remain backward compatible with older versions of Python. If
you maintain a package which you support for Python 3.4, 3.5, 3.6, and
3.7, you'll probab
;Changed in version 3.7".)
My question to the pros here is what purpose do the __version__/version
variables serve in the Python Standard Library? I can understand in
external packages, but once in the Standard Library...?
For example, in re.py, that line was last changed 18 years ag
On 8/24/2018 5:28 AM, Paul Moore wrote:
On Fri, 24 Aug 2018 at 09:57, Torsten Bronger
wrote:
Hallöchen!
Path-like objects are accepted by all path-processing functions in
the standard library since Python 3.6. Unfortunately, this is not
made explicit everywhere. In particular, if I pass a
On Fri, 24 Aug 2018 at 09:57, Torsten Bronger
wrote:
>
> Hallöchen!
>
> Path-like objects are accepted by all path-processing functions in
> the standard library since Python 3.6. Unfortunately, this is not
> made explicit everywhere. In particular, if I pass a Path in the
&
Hallöchen!
Path-like objects are accepted by all path-processing functions in
the standard library since Python 3.6. Unfortunately, this is not
made explicit everywhere. In particular, if I pass a Path in the
first argument of subprocess.run, do I use an implementation detail
of CPython
On Friday, March 2, 2018 at 12:27:17 PM UTC-8, Lawrence D’Oliveiro wrote:
> On Saturday, March 3, 2018 at 6:42:05 AM UTC+13, bsfer...@avnera.com wrote:
>
> > ...
> > File "/nfs/home/myuser/lfs/sources/Python-3.6.4/Lib/shutil.py", line 476,
> > in rmtree
> > ...
>
> NFS trouble?
>
> I have had
Here's my configure I need to set ac_cv_fun_utimensat=no and
ac_cv_func_futimens=no because presumably the file-system or kernel on my
system doesn't support nanosecond timestamps. With these options, and patching
the configure/setup.py files to remove references to /usr/lib/ncursesw and
replac
I posted this to Stackoverflow and the original post can be seen here. I'll try
and copy and past the contents below. Thank you for your help!
https://stackoverflow.com/questions/49074327/python-3-6-fails-to-install-to-non-standard-directory-under-linux
I have a completely insulated boostr
On 19Oct2017 12:08, Matt Schepers wrote:
I prefer to use vim and ctags when developing python, but I'm having
trouble getting ctags to index the standard library. Sometimes I would like
to see an object's constructor etc...
Does anyone know how to do this?
Will "ctags -o your-
I prefer to use vim and ctags when developing python, but I'm having
trouble getting ctags to index the standard library. Sometimes I would like
to see an object's constructor etc...
Does anyone know how to do this?
Thanks
--
https://mail.python.org/mailman/listinfo/python-list
On 2017-09-15 17:45, Terry Reedy wrote:
> On 9/15/2017 3:36 PM, Tim Chase wrote:
> >d = {
> > "a": 0,
> > "a": 1,
> > "a": 2,
> >}
> >
> > In my limited testing, it appears to always take the last one,
> > resulting in
> >
> >{"a": 2}
> >
> > Is this guaranteed
16.09.17 00:45, Terry Reedy пише:
On 9/15/2017 3:36 PM, Tim Chase wrote:
Looking through docs, I was unable to tease out whether there's a
prescribed behavior for the results of defining a dictionary with the
same keys multiple times
d = {
"a": 0,
"a": 1,
"a": 2,
}
Tim Chase wrote:
> Looking through docs, I was unable to tease out whether there's a
> prescribed behavior for the results of defining a dictionary with the
> same keys multiple times
>
> d = {
> "a": 0,
> "a": 1,
> "a": 2,
> }
>
> In my limited testing, it appears to alwa
On 9/15/2017 3:36 PM, Tim Chase wrote:
Looking through docs, I was unable to tease out whether there's a
prescribed behavior for the results of defining a dictionary with the
same keys multiple times
d = {
"a": 0,
"a": 1,
"a": 2,
}
In my limited testing, it appears t
Looking through docs, I was unable to tease out whether there's a
prescribed behavior for the results of defining a dictionary with the
same keys multiple times
d = {
"a": 0,
"a": 1,
"a": 2,
}
In my limited testing, it appears to always take the last one,
resulting in
{"
On 9/7/17, Thomas Jollans wrote:
> On 2017-09-06 16:14, Fetchinson . via Python-list wrote:
>> Hi folks,
>>
>> I'm trying to install a binary package (tensorflow) which contains
>> some binary C extensions. Now my system glibc is 2.15 but the binaries
>> in the C extensions were created (apparentl
On 2017-09-06 16:14, Fetchinson . via Python-list wrote:
> Hi folks,
>
> I'm trying to install a binary package (tensorflow) which contains
> some binary C extensions. Now my system glibc is 2.15 but the binaries
> in the C extensions were created (apparently) with glibc 2.17. So I
> thought no pr
"Fetchinson . via Python-list" writes:
> I'm trying to install a binary package (tensorflow) which contains
> some binary C extensions. Now my system glibc is 2.15 but the binaries
> in the C extensions were created (apparently) with glibc 2.17. So I
> thought no problemo I installed glibc 2.17 t
Hi folks,
I'm trying to install a binary package (tensorflow) which contains
some binary C extensions. Now my system glibc is 2.15 but the binaries
in the C extensions were created (apparently) with glibc 2.17. So I
thought no problemo I installed glibc 2.17 to a custom location, built
python2.7 f
Andre Müller wrote:
> # to impress your friends you can do
> for chunk in itertools.zip_longest(*[iter(s)]*4):
> chunked_str = ''.join(c for c in chunk if c) # generator expression
> inside join with condition
> print(chunked_str)
This can be simplified with a fillvalue
>>> s = "abracad
Am 15.06.2017 um 07:09 schrieb Jussi Piitulainen:
> Andre Müller writes:
>
>> I'm a fan of infinite sequences. Try out itertools.islice.
>> You should not underestimate this very important module.
>>
>> Please read also the documentation:
>> https://docs.python.org/3.6/library/itertools.html
>>
>>
Andre Müller writes:
> I'm a fan of infinite sequences. Try out itertools.islice.
> You should not underestimate this very important module.
>
> Please read also the documentation:
> https://docs.python.org/3.6/library/itertools.html
>
> from itertools import islice
>
> iterable = range(10
I'm a fan of infinite sequences. Try out itertools.islice.
You should not underestimate this very important module.
Please read also the documentation:
https://docs.python.org/3.6/library/itertools.html
from itertools import islice
iterable = range(100)
# since Python 3 range is a lazy e
Thank you Peter and Jussi - both your solutions were very helpful!
Malcolm
--
https://mail.python.org/mailman/listinfo/python-list
Malcolm Greene writes:
> Wondering if there's a standard lib version of something like
> enumerate() that takes a max count value?
> Use case: When you want to enumerate through an iterable, but want to
> limit the number of iterations without introducing if-condition-break
Malcolm Greene wrote:
> Wondering if there's a standard lib version of something like
> enumerate() that takes a max count value?
> Use case: When you want to enumerate through an iterable, but want to
> limit the number of iterations without introducing if-condition-break
Wondering if there's a standard lib version of something like
enumerate() that takes a max count value?
Use case: When you want to enumerate through an iterable, but want to
limit the number of iterations without introducing if-condition-break
blocks in code.
Something like:
for counter, k
Thanks for your suggestions Chris and Terry.
The answer I was looking for is the modulefinder module which is part of
the standard lib. Works like a charm!
Quote: This module provides a ModuleFinder class that can be used to
determine the set of modules imported by a script. modulefinder.py can
On 9/16/2016 7:29 AM, Malcolm Greene wrote:
Looking for suggestions on how, given a main script, discover all the
non-standard library modules imported across all modules, eg. the
modules that other modules import, etc. I'm not looking to discover
dynamic imports or other edge cases, jus
On Fri, Sep 16, 2016 at 9:29 PM, Malcolm Greene wrote:
> Looking for suggestions on how, given a main script, discover all the
> non-standard library modules imported across all modules, eg. the
> modules that other modules import, etc. I'm not looking to discover
> dynamic impo
Looking for suggestions on how, given a main script, discover all the
non-standard library modules imported across all modules, eg. the
modules that other modules import, etc. I'm not looking to discover
dynamic imports or other edge cases, just the list modules loaded via
"import &
On Sat, Jul 9, 2016 at 4:08 AM, wrote:
>
> I noticed __qualname__ is exposed by locals() while defining a class.
This is an undocumented implementation detail used to pass this
information to the metaclass. You'll also see __module__ and, if the
class has a docstring, __doc__. For CPython, this
Hi all,
I noticed __qualname__ is exposed by locals() while defining a class. This is
handy but I'm not sure about its status: is it standard or just an artifact of
the current implementation? (btw, the pycodestyle linter -former pep8- rejects
its usage). I was unable to find any referen
r, not bytes
> Undaunted, I changed the error on line 409. The line then read:
>
> if first.startswith(BOM_UTF8):
As Steven says -- don't change the standard library.
Your problem is likely that you are opening the file containing the code you
want to tokenize in text mode. Compare:
; if first.startswith(BOM_UTF8):
I'm not seeing any actual difference between the before and after:
if first.startswith(BOM_UTF8):
if first.startswith(BOM_UTF8):
but in another email, you state that you changed it to:
if first.startswith('BOM_UTF8'):
Changing the
On Thu, 16 Jun 2016, 23:31 Harrison Chudleigh, <
harrison.chudlei...@education.nsw.gov.au> wrote:
> Sorry! I was trying to indent a line and accidentally sent only half of the
> message.
>
It would be helpful if your reply was actually a reply to your previous
message, to enable us to follow the
ize.py",
> line 409, in detect_encoding
> if first.startswith('BOM_UTF8'):
> TypeError: startswith first arg must be bytes or a tuple of bytes, not str.
> So, first the interpreter says startswith() takes strings, now it says it
> takes bytes? What should the module be doing
a tuple of bytes, not str.
So, first the interpreter says startswith() takes strings, now it says it
takes bytes? What should the module be doing?
This is an error with the standard library of Python 3.4.1, Mac OS X.
***
Th
While working on a program, I ran into an error with the usage of the
module tokenize. The following message was displayed.
File
"/Library/Frameworks/Python.framework/Versions/3.4/lib/python3.4/tokenize.py",
line 467, in tokenize
encoding, consumed = detect_encoding(readline)
File
"/Library/
Ulli Horlacher writes:
>> tarfile.TarFile.extractall = new_extractall
>
> This is more easy than I could imagined :-) It is in my Python notes,
> now.
This is called "duck punching" or "monkey patching" and sometimes it's
necessary, but it's something of an antipattern since the module could
chan
Matt Wheeler wrote:
> > How can I substitute the standard module function tarfile.extractall() with
> > my own function?
>
> import tarfile
> def new_extractall(self, *args, **kwargs):
> print("I am a function. Woohoo!")
>
> tarfile.TarFile.extrac
On 11 February 2016 at 17:10, Ulli Horlacher
wrote:
>
> Ulli Horlacher wrote:
> As a hack, I modified the standard library module tarfile.py:
>
> root@diaspora:/usr/lib/python2.7# vv -d
> --- ./.versions/tarfile.py~1~ 2015-06-22 21:59:27.0 +0200
> +++ tarfile
ckwards is not allowed")
>
> Of course, a stream is not seekable.
>
> Any ideas?
As a hack, I modified the standard library module tarfile.py:
root@diaspora:/usr/lib/python2.7# vv -d
--- ./.versions/tarfile.py~1~ 2015-06-22 21:59:27.0 +0200
+++ tarfile.py 2016-02-11 18
your handmade solution,
but call it SimpleNamespace, and make it entirely compatible with the
Python 3.3 one. Then, when you do get a chance to upgrade, all you
need to do is change your import statement, and you're using the
standard library one. Plus, it's going to be easy for anyone
>>> I also thought the stdlib had some kind of "namespace" class with this
>>> kind
>>> of API, but I can't find it now:-(
>>
>>
>> It does - types.SimpleNamespace(). It accepts keyword arguments, and
>> will let you create more attributes on the fly (unlike a namedtuple).
>
>
> Yes, that's it. Tha
On 11Aug2015 14:09, Chris Angelico wrote:
On Tue, Aug 11, 2015 at 1:40 PM, Cameron Simpson wrote:
I also thought the stdlib had some kind of "namespace" class with this kind
of API, but I can't find it now:-(
It does - types.SimpleNamespace(). It accepts keyword arguments, and
will let you c
On Tue, Aug 11, 2015 at 1:40 PM, Cameron Simpson wrote:
> I also thought the stdlib had some kind of "namespace" class with this kind
> of API, but I can't find it now:-(
It does - types.SimpleNamespace(). It accepts keyword arguments, and
will let you create more attributes on the fly (unlike a
ot a base class called "O" like that:
https://pypi.python.org/pypi/cs.obj/
I am curious if anybody knows similar "dummy" class located in
standard libraries? I'd be glad to use it instead.
namedtuple initialises and accesses like that:
>>> from collections import
class
> around my projects and import its module in every code producing data.
>
> I am curious if anybody knows similar "dummy" class located in
> standard libraries? I'd be glad to use it instead.
This is commonly known as a "Bunch" class, after the Python C
ot; class located in
standard libraries? I'd be glad to use it instead.
Thanks,
Vladimir
https://itunes.apple.com/us/app/python-code-samples/id1025613117
--
https://mail.python.org/mailman/listinfo/python-list
Howdy all,
What standard Python library is there to make test doubles of
‘httplib.HTTPConnection’ and ‘urllib2.HTTPBasicAuthHandler’ and so on?
I have a code base (Python 2 code) which performs HTTP sessions using
the various HTTP-level classes in the standard library.
Testing this code will be
-07-05, 23:59:59 CEST
and still benefit from our Standard Rates:
* Student: 120 EUR
* Personal: 340 EUR
* Business: 530 EUR
(all incl. 10% Spanish VAT)
Social Event
Please also remember to book your Social Event Ticket. The price for
this, EUR 40, won’t change, but we only have
been waiting for many years (decades actually) to have this concept
> incorporated as a standard container in one of the modern programming
> languages so we could swap our code with a language-standard container. To
> further these efforts, we have decided to initiate a conversation wit
We've been using a simple container implementation of a mathematical relation
(https://simple.wikipedia.org/wiki/Relation_(mathematics)) (i.e. an invertible
M:M mapping) for some time.
We've been waiting for many years (decades actually) to have this concept
incorporated as a standard
us to set the standard ticket prices for
this year. We tried to keep student prices as low as possible, since
we would like to see more students at the conference:
Student: EUR 120.00
Personal: EUR 340.00
Business: EUR 530.00
(incl. 10% Spanish VAT)
Early-bird tickets are nearly
On Sunday, 22 February 2015 14:11:54 UTC, Mark Lawrence wrote:
> On 19/02/2015 16:27, Phillip Fleming wrote:
> > In my opinion, Python will not take off like C/C++ if there is no ANSI
> > standard.
> >
>
> Python has already taken off because it doesn't hav
Skip Montanaro wrote:
> On Thu, Feb 19, 2015 at 10:27 AM, Phillip Fleming
> wrote:
>> In my opinion, Python will not take off like C/C++ if there is no ANSI
>> standard.
>
> On one side of your statement, what makes you think Python ever wanted
> to "take of
On 19/02/2015 16:27, Phillip Fleming wrote:
In my opinion, Python will not take off like C/C++ if there is no ANSI
standard.
Python has already taken off because it doesn't have a standard as such.
--
My fellow Pythonistas, ask not what our language can do for you, ask
what you can d
On Thu, Feb 19, 2015 at 10:27 AM, Phillip Fleming wrote:
> In my opinion, Python will not take off like C/C++ if there is no ANSI
> standard.
On one side of your statement, what makes you think Python ever wanted
to "take off like C/C++"? On the other side, there are other lang
In my opinion, Python will not take off like C/C++ if there is no ANSI
standard.
--
https://mail.python.org/mailman/listinfo/python-list
On Thu, Oct 2, 2014 at 2:45 AM, Steven D'Aprano
wrote:
> Code for evaluating mathematical expressions are very common, if you google
> for "expression parser" I am sure you will find many examples. Don't limit
> yourself to Python code, you can learn from code written in other languages
> too, e.g
math math wrote:
> Hi,
>
> I am trying to learn Python while solving exercises.
>
> I want to basically write a program that inputs a polynomial in standard
> algebraic notation and outputs its derivative.
>
> I know that I need to get the exponent somehow,
On 01/10/2014 09:01, math math wrote:
What would be a good starting strategy for writing a program to take the
derivative of a polynomial expression, such as this below?:
"x**3 + x**2 + x + 1"
You can look at sympy:
>>> from sympy import *
>>> equation = simplify("x**3 + x**2 + x + 1")
>>> e
On 01/10/2014 09:01, math math wrote:
What would be a good starting strategy for writing a program to take the
derivative of a polynomial expression, such as this below?:
"x**3 + x**2 + x + 1"
You can look at sympy:
>>> from sympy import *
>>> equation = simplify("x**3 + x**2 + x + 1")
>>> eq
Thanks a lot, I will give this a shot.
--
https://mail.python.org/mailman/listinfo/python-list
On Wed, Oct 1, 2014 at 5:01 PM, math math wrote:
> What would be a good starting strategy for writing a program to take the
> derivative of a polynomial expression, such as this below?:
> "x**3 + x**2 + x + 1"
>
> I am a bit confused about my overall strategy. Should one be writing a parser
> cl
1 - 100 of 1445 matches
Mail list logo