Steven D'Aprano writes:
> On Mon, 19 Feb 2018 09:40:09 +0100, Alain Ketterlin wrote:
>
>> Tim Delaney writes:
>>
>> [...]
>>> As others have said, typing is about how the underlying memory is
>>> treated.
>>
>> No. It is much more t
Chris Angelico writes:
> On Mon, Feb 19, 2018 at 9:04 PM, Alain Ketterlin
> wrote:
>> Look at the C11 standard, section 6.3.2.3 ("Pointers"), 6.5.§6-7
>> ("effective types"), and 6.5.3.2 ("Address and indirection operators").
>> It i
Chris Angelico writes:
> On Mon, Feb 19, 2018 at 7:40 PM, Alain Ketterlin
> wrote:
>> No. C has much stronger rules, not on casting, but on accessing the
>> pointees, which basically invalidates your argument. Refer to the C
>> standard for details.
>
> Really
too complex to
capture, testing will be incomplete, and all you can do is run your
program and see whether is goes through.
As a general rule, if that's all you expect from typing, then, fine,
call this "strong". I won't go as far, and just say that it is good
enough for th
any side-effect and/or throw an exception). And be fired right
after your first code review.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
/conventional resolution.
By the way, the use of gettimeofday() is strange since this function is
now deprecated... clock_gettime() should be used instead. It has an
associated clock_getres() as well.
-- Alain.
[*] WTF is wrong with these microsoft developpers? Clocks and
performance counters are
ck that 39 is
correct). Your data look like fixed-width fields.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
w Lua operates too?
No. Lua uses a register-based (virtual) machine. See
https://www.lua.org/doc/jucs05.pdf
I think Lua was the first language in widespread use to move to a
register-based machine.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
hod,
| nor stack trace, stack frame, nor file, socket, window, nor array, nor
| any similar types.
But who knows what "similar types" are...
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
loaded to a Chinese IP address. NBU officials contacted PyPI
| administrators last week who removed the packages before officials
| published a security advisory on Saturday."
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
expressions (but I still dislike it, and don't think such a
feature requires syntactic support).
-- Alain.
[1]
https://docs.python.org/3/reference/expressions.html#displays-for-lists-sets-and-dictionaries
--
https://mail.python.org/mailman/listinfo/python-list
Ho Yeung Lee writes:
> i find kmeans has to input number of cluster
[...]
https://en.wikipedia.org/wiki/Determining_the_number_of_clusters_in_a_data_set
Completely off-topic on this group/list, please direct your questions
elsewhere.
-- Alain.
--
https://mail.python.org/mailman/listi
b,g,r = collect(list_of_parrots[1:])
h = list_of_parrots[0]
if h.color == 'blue':
return ([h]+b,g,r)
elif h.color == 'green':
... and so on
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
ave tried this once. "Next time you're fired/dead" (and less pleasant
variants) was the only comment I got from people I shared files with.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
ded.
> Remember, kids: Just Say No to the Invisible Menace.
And US government officials call them "alternative spaces".
Enough said.
-- Alain.
P/S: just in case: https://www.jwz.org/doc/tabs-vs-spaces.html
--
https://mail.python.org/mailman/listinfo/python-list
emove work like this under Windows too?
No, Windows has its own set of rules:
https://msdn.microsoft.com/en-us/library/bb727008.aspx
> Under what circumstances will os.remove fail to remove a file?
>
> If you don't own the file and have no write permission, if it is on
> read-only media, anything else?
I'm not sure which system you are asking about, here. See above.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
d horizontal line elements?
Box-drawing characters. At least that's how Unicode calls them. Even if
you don't draw boxes...
https://en.wikipedia.org/wiki/Box-drawing_character
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
taneously), you just
overwrite the first element twice.
Congratulations, a very good corner case (you can't call it a bug, since
it conforms to the definition of the language).
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
tle will
> have the date a year off.
>
> What I would like to do it output to another file that show those two
> as a match.
Try the difflib module (read the doc, its default behavior may be
surprising).
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
python to understand your new syntax, just write a small
interpreter to translate your new language to python.
--
Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses
m just an amateur developer.
But what confuse me, is that Python require "real live" interpratation
of the code to work properly (or perhaps i also confuse on that but
Python rely on interpretation of the code to conform to its own
standard, ie variables can change type during execution...)
--
Pierre
trange the initial request.
And sure, i overinterpret or simplify thing (compiling)...
But it seems that all this talk do not interested the initial requester
(Mr Puneet) : at that time he has not answer to the thread.
--
Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/&
interpretation, byte-code compilation, JIT
compilation, AOT compilation...
So yes Python compile (bytecode).
--
Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licens
means it is most definitely
> meant to be able to be caught.
Using compile() function yes.
So yes there is a way to check "syntax error" before executing code
(using compile function and exceptions) but it was not standard, nor
widely used... It was still a hack for me, but perhaps
uested but that only a
hack and should not be used in real world.
--
Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
--
https://mail.python.org/mailman/listinfo/python-list
t I haven't checked).
Are you sure this is your (real) problem?
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
ve the page, extract data,
extract last river level and mean the 24h last levels.
<https://www.dropbox.com/sh/k5974t374zmcoj6/AACes_Xo5DrxCbE1RjSaeKXYa?dl=0>
Note : it was probably not beautiful python code, but it works for the
purpose it was written.
--
Pierre-Alain Dorange
ns no matching
blocks).
It is all due to the "Autojunk" heuristics (see difflib's doc for
details), which considers the first characters as junk. Call
SM(...,autojunk=False).
I have no idea why the maintainers made this stupid autojunk idea the
default. Complain with them.
-- Al
DFS wrote:
>
> 2 lines? Love it!
>
> But apparently eval==evil.
>
> http://nedbatchelder.com/blog/201206/eval_really_is_dangerous.html
>
> I bet you get hammered about it here on clp.
It was a software to be deploy, it was just for educational purpose.
l#identifiers
To me it makes a lot of sense to *not* include category Sm characters in
identifiers, since they are usually used to denote operators (like +).
It would be very confusing to have a variable named ∇f, as confusing as
naming a variable a+b or √x.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
-
env={}
env["__builtins__"] = None
u=raw_input('Enter calculation:")
print eval(u,env)
-
--
Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
--
https://mail.python.org/mailman/listinfo/python-list
;*':c=n1*n2
> if op=='/':c=n1/n2
> print(ui+' = '+str(c))
> ---
More reduced :
--
u=raw_input('Enter calculation:")
print eval(u)
--
works and compute :
1+2+3+4-1+4*2
2+3.0/2-0.5
Pe
he poor sod who wrote the compiler think it was a good idea?
I don't know, but he has a good excuse: he was one of the first to ever
write a compiler (see https://en.wikipedia.org/wiki/Compiler, the
section on History).
You just called John Backus a "poor sod". Think again.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
;something" that perhaps will fill
the list (word.append("hello").
Then after do your job, you perhaps need to print it.
But initializing and just print, will do nothing else than initialize
and print the result...
As state before this code more or less like :
a=0
print a
--
P
something must exist first.
--
Pierre-Alain Dorange Moof <http://clarus.chez-alice.fr/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa wrote:
> Note that the "valid point of view for external observers" is the only
> valid scientific point of view.
For a scientific point of view, right. But tell this to the one that
will be close to a blackhole ;-)
--
Pierre-Alain Dorange Moof <
Steven D'Aprano wrote:
> > which infinity. There are many - some larger than others
>
> China has just announced a new supercomputer that is so fast it can run an
> infinite loop in 3.7 seconds.
Near a black hole 3.7 seconds can last an infinite time...
--
Pierre-Alain
ncy is always atan2(y,x) tend to pi/4 if you looks at lot od y and
x that will be grater and greater each time : the final frontier would
always be pi/4, even if t take a long time to reach it.
--
Pierre-Alain Dorange<http://microwar.sourceforge.net/>
Ce message est sous licence C
not explore
this, i just thought NSEW was also CENTERED.
Many Thanks.
--
Pierre-Alain Dorange<http://microwar.sourceforge.net/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
--
https://mail.python.org/mailman/listinfo/python-list
pmx-bigmap>
the tkinter code is in pmx.py
the canvas class was TMap
GUI was created in main_gui.__init__()
callback function was main_gui.resize()
--
Pierre-Alain Dorange<http://microwar.sourceforge.net/>
Ce message est sous licence Creative Commons &quo
been NaN too but
i'm not a math expert, but the limit of atan2 would be 45°, so pi/4
radians (0,7854).
As x,y are coordinates, the both infinite would tend toward 45°.
x only infinite would be 0° (0 radians)
y only infinite woudl be 180° (pi/2 radians)
--
Pierre-Alain Dorange&
Steven D'Aprano wrote:
> py> math.atan2(NAN, 0)
> nan
>
> I think that the only way it will return a NAN is if passed a NAN.
yes of course if you pass an invalid argument (NAN is not a real value,
atan2 except coordinate x,y), the result would be invalid...
--
to see a different portion.
So i except the map to be resized to show a bigger portion of the whole
map : no streching.
--
Pierre-Alain Dorange<http://microwar.sourceforge.net/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.
quadrant (for angle answer).
--
Pierre-Alain Dorange<http://microwar.sourceforge.net/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
--
https://mail.python.org/mailman/listinfo/python-list
he cell where the canvas widget is put).
I think i can resize the canvas, but i can't find a way to get the
available space after resize.
Perhaps using the grid manager is not the godd idea for that ?
I except it was more understandable.
--
Pierre-Alain Dorange<http://microwar.sour
at to do from that.
Any clue or advice or tutorial ?
--
Pierre-Alain Dorange<http://microwar.sourceforge.net/>
Ce message est sous licence Creative Commons "by-nc-sa-2.0"
<http://creativecommons.org/licenses/by-nc-sa/2.0/fr/>
--
https://mail.python.org/mailman/listinfo/python-list
e a job for a suffix trees.
Depending on what you are after, you may also be interested in the
sequitur algorithm (http://www.sequitur.info/).
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
"float". See
http://floating-point-gui.de/ for a nice explanation. Use decimal
(https://docs.python.org/2/library/decimal.html) if you need exact
representations.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
ator has a corresponding fixed-point combinator
called Y*. There is quite a bit of theory behind this, anybody
interested can google, e.g., "Y combinator mutual recursion", whose
first result is:
http://stackoverflow.com/questions/4899113/fixed-point-combinator-for-mutually-recursive-functions
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Grant Edwards writes:
>>
>> [...]
>>> Or to be a bit obtuse: Python parameters are passed by value, but all
>>> values are references.
>>
>> Exactly, that's a perfect description. Ther
attributes) are references.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Steven D'Aprano writes:
> On Fri, 5 Jun 2015 04:17 am, Alain Ketterlin wrote:
>
>> Steven D'Aprano writes:
>>
>> [...]
>>> But you still find a few people here and there who have been exposed to
>>> Java foolishness, and will argue that
, reference to 23.
No, Java doesn't work like that for primitive types (assuming that by
"Java" you mean the language and execution environment defined in
reference documents).
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
random...@fastmail.us writes:
> On Wed, Jun 3, 2015, at 03:11, Alain Ketterlin wrote:
>> Thank you, I know this. What I mean is: what are the reasons that you
>> cannot access your file descriptors one by one? To me closing a range of
>> descriptors has absolutely no me
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Marko Rauhamaa writes:
>>> First, if close() fails, what's a poor program to do?
>>
>> Warn the user? Not assume everything went well? It all depends on the
>> application, and what the file descripto
Chris Angelico writes:
> On Wed, Jun 3, 2015 at 7:06 AM, Alain Ketterlin
> wrote:
>> I've no idea what the OP's program was doing, so I'm not going to split
>> hairs. I can't imagine why one would like to mass-close an arbitrary set
>> of file desc
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> The close(2) manpage has the following warning on my Linux system:
>>
>> | Not checking the return value of close() is a common but
>> | nevertheless serious programming error. It is quite possible that
>> | err
especially be observed with NFS and with disk quota.
|
(I haven't followed the thread, but if your problem is to make sure fds
are closed on exec, you may be better off using the... close-on-exec
flag. Or simply do the bookkeeping.)
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
'media=A4',
> output])
> p.wait()
Maybe using check_call() would be simpler, but it will, well, check for
the exit code of convert/lpr (which you should do anyway). And I would
call that variable "threshold" instead of "treshold".
(What I don't see is the advantage you find in writing such scripts in
python instead of sh, but I guess you have your own reasons.)
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
s).
> I suppose I needed to keep a record of all the pid's and wait on them
> at some convenient time.
Yes.
> The subprocess version appears to be doing that for me somehow.
Not sure what you mean. You have to do the bookkeeping yourself.
(But, does beep really take so much time that you can't just call() it?)
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Dave Angel writes:
> On 05/06/2015 11:36 AM, Alain Ketterlin wrote:
>> Yes, plus the time for memory allocation. Since the code uses "r *=
>> ...", space is reallocated when the result doesn't fit. The new size is
>> probably proportional to the current (in
ge
> as your timings, but I think it still gives some explanation of the
> effect.
Yes, plus the time for memory allocation. Since the code uses "r *=
...", space is reallocated when the result doesn't fit. The new size is
probably proportional to the current (insufficient) size
k.AF_INET == 2
> sock.AF_INET6 == 10
> ip.version == 4 or 6
Check the value of the "version" attribute. Or use socket.getaddrinfo(),
which is more convenient if all you need is an address parser.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Chris Angelico writes:
> On Thu, Apr 9, 2015 at 11:57 PM, Alain Ketterlin
> wrote:
>> Because, in:
>>
>> z = x+y; // all signed ints
>> if ( z < x )
>> ...
>>
>> either there was no overflow (and the condition is false), or
; for unsigned and for signed, while the underlying architecture of
>> every twos complement machine I have used did add, subtract, and
>> multiply as though the numbers were unsigned (what you call modular
>> arithmetic).
>
> Alain did have a point. *If* I had used int64_t in my
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> No, it would not work for signed integers (i.e., with lo and hi of
>> int64_t type), because overflow is undefined behavior for signed.
>
> All architectures I've ever had dealings with have used 2's-complement
&g
both for signed and unsigned integers.
(Slightly off-topic, but...)
No, it would not work for signed integers (i.e., with lo and hi of
int64_t type), because overflow is undefined behavior for signed.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
fo
on "FE80...%eth0" (change eth0 to the name of the interface you want to
use) to get a valid 4-tuple. Use that instead of your (HOST,0). You can
also try '::' (kind of inaddr6_any), I don't know if that's what you
want.
But I think you can't bind a raw socket
here is a pysctp module
on pypi. (Haven't tried it, I've just made a quick search on SCTP in
Python.)
Or roll your own protocol on top of UDP, but that's another story.
[...]
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
t;,port,...)
should work for you (family, socktype etc should be passed also to avoid
searching the results of getaddrinfo()).
Hope this helps,
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
zero of all types, and empty
strings and containers (including strings, tuples, lists, dictionaries,
sets and frozensets). All other values are interpreted as true."
(links are to the 2.7 version of the reference manual, I think not much
has changed in 3.* versions.)
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
0 else 3
> <=>
> j = (lambda: 3, lambda: j + 1)[j < 10]()
This is just a way to delay evaluation *of the potential results*, i.e.,
instill a bit of lazyness. One could object that, again, both
expressions in the tuple have been evaluated (building two lambdas),
only one of which is finally called. I guess that's what BartC meant.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
:
>for line in open('flooding-psiphi.dat','r'):
>x, y, z = map(float, line.split())
>xs.append(x)
>ys.append(y)
>zs.append(z)
Or even:
xs,ys,zs = zip(*[ map(float,line.split())
for line in open('flooding-psiphi.dat
Mark Lawrence writes:
> On 07/06/2014 09:20, Alain Ketterlin wrote:
>> Sturla Molden writes:
>>>>>> Many of these students suggest Python as the
>>>>>> development language (they learned it and liked it), and the suggestion
>>>>>
Sturla Molden writes:
> Alain Ketterlin wrote:
>> Sturla Molden writes:
>>
>>> Alain Ketterlin wrote:
>>>
>>>> Many of these students suggest Python as the
>>>> development language (they learned it and liked it), and the suggestio
Sturla Molden writes:
> On 05/06/14 22:27, Alain Ketterlin wrote:
>> I have seen dozens of projects where Python was dismissed because of the
>> lack of static typing, and the lack of static analysis tools.
[...]
> When is static analysis actually needed and for what purpose?
Chris Angelico writes:
> On Fri, Jun 6, 2014 at 7:23 AM, Mark Lawrence wrote:
>> On 05/06/2014 21:07, Alain Ketterlin wrote:
>>>
>>> Sturla Molden writes:
>>>
>>>> On 05/06/14 10:14, Alain Ketterlin wrote:
>>>>
>>>>>
Sturla Molden writes:
> Alain Ketterlin wrote:
>
>> Many of these students suggest Python as the
>> development language (they learned it and liked it), and the suggestion
>> is (almost) always rejected, in favor of Java or C# or C/C++.
>
> And it was almost a
Terry Reedy writes:
> On 6/5/2014 4:07 PM, Alain Ketterlin wrote:
>
>>> When I compile Cython modules I use LLVM on this computer.
>>
>> Cython is not Python, it is another language, with an incompatible
>> syntax.
>
> Cython compiles Python with optional e
Travis Griggs writes:
>> On Jun 5, 2014, at 1:14, Alain Ketterlin wrote:
>>
>> Swift's memory management is similar to python's (ref. counting). Which
>> makes me think that a subset of python with the same type safety would
>> be an instant success.
Chris Angelico writes:
> On Fri, Jun 6, 2014 at 6:07 AM, Alain Ketterlin
> wrote:
>>> Perhaps, perhaps not. My experience is that only a small percentage of
>>> the CPU time is spent in the Python interpreter.
>>
>> Basically, you're saying that a major
Chris Angelico writes:
> On Thu, Jun 5, 2014 at 7:42 PM, Alain Ketterlin
> wrote:
>> Chris Angelico writes:
>>
>>> On Thu, Jun 5, 2014 at 6:14 PM, Alain Ketterlin
>>> wrote:
>>>> Swift's memory management is similar to python's (
Sturla Molden writes:
> On 05/06/14 10:14, Alain Ketterlin wrote:
>
>> Type safety.
>
> Perhaps. Python has strong type safety.
Come on.
[...]
>>(And with it comes better performance ---read battery
>> life--- and better static analysis tools, etc.)
>
> Pe
Chris Angelico writes:
> On Thu, Jun 5, 2014 at 6:14 PM, Alain Ketterlin
> wrote:
>> Swift's memory management is similar to python's (ref. counting). Which
>> makes me think that a subset of python with the same type safety would
>> be an instant success.
middle- and back-end, and a brand new front-end
incorporating a decent type system (including optional types for
instance).
Swift's memory management is similar to python's (ref. counting). Which
makes me think that a subset of python with the same type safety would
be an instant success
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> The real nice thing that makes Julia a different language is the
>> optional static typing, which the JIT can use to produce efficient code.
>> It's the only meaningful difference with the current state of python.
Mark H Harris writes:
> On 5/12/14 3:44 AM, Alain Ketterlin wrote:
>> When you are doing scientific computation, this overhead is
>> unacceptable, because you'll have zillions of computations to perform.
>
> I'm still trying to sort that out. I have not teste
Mark H Harris writes:
> On 5/11/14 12:05 PM, Alain Ketterlin wrote:
>>> Julia is Matlab and R, Python, Lisp, Scheme; all rolled together on
>>> steroids. Its amazing as a dynamic language, and its fast, like
>>> lightning fast as well as multiprocessing (parall
also Matlab, Mathematica, NumPy, & SciPy (and
> others). Keep your eye on her fellows.
Well, Fortran experts around me are skeptic.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
ry: 1.*1e-162*1e-162. Equals zero.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> which does an exact traversal of potential the DOM tree... (assuming a
>> DOM is even defined on a non well-formed XML document).
>>
>> Anyway, my point was only to warn the OP that he is not doing XML.
>
> I c
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Marko Rauhamaa writes:
>>> Sometimes the XML elements come through a pipe as an endless
>>> sequence. You can still use the wrapping technique and a SAX parser.
>>> However, the other option is to write a t
Marko Rauhamaa writes:
> Alain Ketterlin :
>
>> Technically speaking, this is not a well-formed XML document (it is a
>> well-formed external general parsed entity, though). If you have other
>> XML processors in your workflow, they will/should reject it.
>
> S
orkflow, they will/should reject it.
The easiest fix is to wrap this inside a root element (see other
messages in this thread), or use a DTD-declared entity to include this
fragment in a document.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
gt; if key.startswith('<') and key.endswith('>'): ...
>
> and:
>
> if (key[:1], key[-1:]) == ('<', '>'): ...
I would do: if key[0] == '<' and key[-1] == '>' ...
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
luke.gee...@gmail.com writes:
> Can I make it that if
> C = int(sys.argv[3])
> But when I only enter 2 argumentvariable it sets c automaticly to 0 or 1
C = int(sys.argv[3]) if len(sys.argv) > 3 else 0
is one possibility.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
a x:e)(v)
In your case:
[ (lambda na,ti : somefunc(ti[1],ti[2],ti[6],na))(name,localtime(then))
for then,name in mylist ]
Warning: absolutely untested (not even syntax-checked).
You may also use *localtime(...) and keep underscores.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
pipes (FIFOs) or the /dev/fd method of naming open files. It
|takes the form of <(list) or >(list). The process list is run
|with its input or output connected to a FIFO or some file in
|/dev/fd. The name of this file is passed as an argument to the
|current command as the result of the expansion.
-- Alain.
--
https://mail.python.org/mailman/listinfo/python-list
Mark Lawrence writes:
> On 31/10/2013 13:17, Alain Ketterlin wrote:
>> "E.D.G." writes:
>>
>>>The calculation speed question just involves relatively simple
>>> math such as multiplications and divisions and trig calculations such
>>
Chris Angelico writes:
> On Fri, Nov 1, 2013 at 12:17 AM, Alain Ketterlin
> wrote:
>> "E.D.G." writes:
>>
>>> The calculation speed question just involves relatively simple
>>> math such as multiplications and divisions and trig calculation
1 - 100 of 289 matches
Mail list logo