511. Punishment for attempting to commit offences punishable withimprisonment for life or other imprisonment.--Whoever attempts tocommit an offence punishable by this Code with 1*[imprisonment forlife] or imprisonment, or to cause such an offence to be committed,and in such attempt does any act towards the commission of theoffence, shall, where no express provision is made by this Code forthe punishment of such attempt, be punished with 2*[imprisonment o fany description provided for the offence, for a term which may extendto one-half of the imprisonment for life or, as the case may be, one-half of the longest term of imprisonment provided for that offence],or with such fine as is provided for the offence, or with both. Illustrations (a) A makes an attempt to steal some jewels by breaking open abox, and finds after so opening the box, that there is no jewel in it.He has done an act towards the commission of theft, and therefore isguilty under this section. (b) A makes an attempt to pick the pocket of Z by thrusting hishand into Z's pocket. A fails in the attempt in consequence of Z'shaving nothing in his pocket. A is guilty under this section.----------------------------------------------------------------------1. Subs. by Act 26 of 1955, s. 117 and Sch., for "transportation".2. Subs. by s. 117 and Sch., ibid., for certain words.