by: Dave Benjamin |
last post by:
Hey all,
I just realized you can very easily implement a sequence grouping function
using Python 2.3's fancy slicing support:
def group(values, size):
return map(None, * for i in...
|
by: george young |
last post by:
I came across an cool python feature that I've not seen discussed.
This may be *implied* by the language reference manual
http://docs.python.org/ref/assignment.html], but it was never
obvious to...
|
by: Paul McGuire |
last post by:
I'm trying to manage some configuration data in a list of tuples, and I
unpack the values with something like this:
configList =
for data in configList:
name,a,b,c = data
... do something...
|
by: Chris |
last post by:
Hi
I'm attempting to write a client for an existing p2p network.
The protocol defines that ints are packed into 4 bytes for transfer.
// Creating the byte vector using the following is fine:...
|
by: tkpmep |
last post by:
I have a list y
>>>y
from which I want to extract only the 2nd and 4th item by partially
unpacking the list. So I tried
>>>a,b = y
Traceback (most recent call last):
File "<interactive...
|
by: John Salerno |
last post by:
I'm a little confused, but I'm sure this is something trivial. I'm
confused about why this works:
('more', 'less'),
('something', 'nothing'),
('good', 'bad'))
(('hello', 'goodbye'), ('more',...
|
by: ram |
last post by:
Stupid question #983098403:
I can't seem to pass an unpacked sequence and keyword arguments to a
function at the same time. What am I doing wrong?
def f(*args, **kw):
for a in args:
print...
|
by: McA |
last post by:
Hi all,
probably a dumb question, but I didn't find something elegant for my
problem so far.
In perl you can unpack the element of a list to variables similar as
in python
(a, b, c = ), but...
|
by: Martin Geisler |
last post by:
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
iEYEARECAAYFAkjlQNwACgkQ6nfwy35F3Tj8ywCgox+XdmeDTAKdN9Q8KZAvfNe4
0/4AmwZGClr8zmonPAFnFsAOtHn4JhfY
=hTwE
-----END PGP...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|