码迷,mamicode.com
首页 >  
搜索关键字:python objects all    ( 160304个结果
python报错 IndentationError: unindent does not match any outer indentation level
这个是缩进问题,重新将行前面的空格删掉,换位tab
分类:编程语言   时间:2014-05-12 16:35:23    阅读次数:383
python 元组和字典中元素作为函数调用参数传递
模式1.def test1(*args): test3(*args)def test2(**kargs): test3(**kargs)def test3(a, b): print(a,b)test1(1,2)test2(a=1,b=2)模式2.def test4(a= ()): ...
分类:编程语言   时间:2014-05-12 16:31:15    阅读次数:520
Ubuntu 下matlab 查看memory函数
function checkmemory%Copyright (c) 2014,Lv Qi%All rights reserved.%%Redistribution and use in source and binary forms, with or without modification, a...
分类:其他好文   时间:2014-05-10 20:07:52    阅读次数:413
make it clear how to use const in C++
1.first of all,take a lookup on the left side of keyword const.If there is something(type or pointer),then apply const featureto it.2.nothing found on...
分类:编程语言   时间:2014-05-06 00:38:25    阅读次数:361
python 求10亿以内和987654互质正整数的和
加群看见的但是计算好慢,谁有更优的算法,麻烦说一下。factor=[]for x in xrange(1, 987654//2+1): if 987654%x==0: factor.append(x)sum=0for y in xrange(1, 1000000000): ...
分类:编程语言   时间:2014-05-06 00:37:50    阅读次数:851
名字空间和异常
那年是787年!公元?——Monty Python任何规则都不可能如此一般,以至不能容许任何例外(异常)。——Bobert Burton1、模块化和界面 任何实际程序都是由一些部分组成的。例如,最简单的“ Hello, world! ”程序也涉及到至少两部分:用户代码要求将Hello, world....
分类:其他好文   时间:2014-05-06 00:19:04    阅读次数:382
精通phthon的条件
1. 熟知主流硬件体系(x86, x64)2. 熟知 CPython 的具体实现,如若可能至少通读源码三遍以上3. 熟知每条 Python bytecode 如何被解释执行4. 熟知每条 Python 语句如何 compile 成 bytecode5. 熟知 Python 主要数据结构所采用的优化手...
分类:其他好文   时间:2014-05-06 00:18:16    阅读次数:306
【LeetCode】Sort Colors
LeetCode OJGiven an array withnobjects colored red, white or blue, sort them so that objects of the same color are adjacent, with the colors in the or...
分类:其他好文   时间:2014-05-02 17:37:37    阅读次数:468
leetcode: Subsets & Subsets II
SubsetsGiven a set of distinct integers,S, return all possible subsets.Note:Elements in a subset must be in non-descending order.The solution set must...
分类:其他好文   时间:2014-05-02 16:39:15    阅读次数:315
Python 2.7安装setuptools时的UnicodeDecodeError解决办法
我猜~~~很多一开始学习python的同学们一定也遇到了这个问题,在安装setuptools时候会遇到UnicodeDecodeError的错误。我学的是3.x,但是周围的人都说2.7好,╮(╯▽╰)╭一开始我也不在乎,但是工作需要使用mongodb,但是它的包暂时只有2.7,我点点点点。无奈我也就...
分类:编程语言   时间:2014-05-02 16:24:03    阅读次数:410
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!