
259 Cal.App.2d 71 (1968)
66 Cal. Rptr. 38
THE PEOPLE, Plaintiff and Respondent,
v.
RONALD DWAYNE PURTA, Defendant and Appellant.
Docket No. 6321.
Court of Appeals of California, First District, Division One.
February 16, 1968.
*72 Steven D. Hallert, under appointment by the Court of Appeal, for Defendant and Appellant.
Thomas C. Lynch, Attorney General, Jerome C. Utz and John F. Henning, Jr., Deputy Attorneys General, for Plaintiff and Respondent.
MOLINARI, P.J.
Defendant appeals from a judgment of conviction entered on a jury verdict finding him guilty of possession of a sharp instrument while confined at a state prison. (Pen. Code, § 4502.)[1] Defendant contends, first, that the court erred in excluding defendant's testimony as to the reasons for his possession of the instrument; and second, that the judge was so biased as to deny defendant his right to a fair ruling on the foregoing evidence. We conclude that neither contention has merit.
On October 30, 1966, defendant was an inmate of Soledad State Prison. On that day Correctional Officer Cole found defendant sitting at a card table with one Winkler and brought both inmates to the sally port area of the prison in order to search them. Correctional Sergeant Bowden told them to empty their pockets, whereupon defendant started backing off into a corner. Defendant had his hands in his pockets; Cole kept demanding that he submit to a search, and finally placed his hands on defendant's wrists. Defendant then took out of his pocket the sharp instrument and handed it to Cole.
Defendant admitted possession of the weapon and testified that it was thrown at him while he was returning from a movie. His counsel then made the following offer of proof, which the court rejected: On October 26 two inmates attempted to get defendant to commit sodomy, and one threatened him with a razor. They beat him up. Defendant told these facts to a lieutenant and asked to be put into protective custody. On the date of the instant offense, four or five inmates jumped defendant and then, while he was running *73 away, threw the weapon at him. He picked it up and was going to bring it to the lieutenant, but got sidetracked talking to Winkler and was thus discovered with the weapon in his possession. The court refused to admit the foregoing testimony but did permit defendant to testify that the instrument had hit him in the back as he was outside the movie being pursued by other inmates.
In People v. Morales, 252 Cal. App.2d 537, 541 [60 Cal. Rptr. 671], we held that section 4502 is constitutionally definite and certain. (See also People v. Wells, 68 Cal. App.2d 476, 480-481 [156 P.2d 979], holding that the section is constitutional.) In Wells the appellate court noted that section 4502 was adopted to protect inmates and officers of state prisons from assaults, on the justifiable theory that there is great danger of imprisoned felons becoming incorrigible and resorting to violence if they are permitted to carry upon their persons deadly weapons. The court stated as follows: "That section of the code absolutely prohibits all prisoners in any state prison, without qualification, from possessing or carrying on their person certain designated deadly weapons. The intention with which the weapon is carried on the person is not made an element of the offense. Proof of the possession of the prohibited weapon infers that it is carried in violation of the statute. [Citations.]" (Page 481.) (See People v. Crenshaw, 74 Cal. App.2d 26, 29 [167 P.2d 781].)
In Crenshaw, a case involving a prosecution for possession of a sharp instrument by a prison inmate under section 4502, the trial court excluded testimony that the defendant had had a fight with one Easter, who threatened to kill him, and that he had possessed a sharpened file as a defense against the anticipated assault. The court on appeal held that excluding this testimony was not error, since self-defense is not a valid defense to a section 4502 prosecution and since in any case the defendant was not confronted with an emergency situation and could have sought protection from the prison authorities.
The reviewing court in Crenshaw noted that in Wells the trial court had admitted evidence tending to show that the defendant prisoner was in possession of a knife for the purpose of defending himself against an anticipated attack by another prisoner who had attacked him, but that there the admissibility of such evidence was not in question. A reading of Wells, moreover, discloses that the evidence was admitted over the objection of the prosecuting officer and that since the defendant had the full benefit of that theory of defense it was *74 not necessary to determine whether such evidence was competent.
In Wells there is a suggestion that there may be a valid proper defense to the charge of violating section 4502 since the opinion states that a defendant "has the burden of proving as a matter of defense, that he is not carrying the weapon in violation of the statute." (Page 481.) It is difficult to reconcile this statement with the appellate court's holding that section 4502 "absolutely prohibits all prisoners in any state prison, without qualification, from possessing or carrying on their persons certain designated deadly weapons." No case in this state, moreover, has indicated the nature of a proper valid defense to the charge of violating section 4502, although in Crenshaw there is a suggestion that, while normally the right of self-defense is not recognized as a defense to a charge of violating that section, a prisoner might be justified in seizing one of the prohibited weapons in order to protect himself if he were confronted with an emergency situation and his life were endangered. [1] We think that with the possible exception of such an emergency situation, the only proper valid defense is that the prisoner was using or possessing a sharp instrument under circumstances showing that such instrument was required for the performance of his prison duties. (See People v. Morales, supra, 252 Cal. App.2d at p. 541.) This conclusion is impelled by the policy considerations hereinbefore alluded to which require that the possession of weapons or instruments by prison inmates be kept within narrow limitations.
[2] In the present case, the excluded testimony does not show that defendant was in imminent danger of assault when he picked up and retained the instrument (see People v. Otis, 174 Cal. App.2d 119, 125 [344 P.2d 342]), nor is there any showing or contention that the instrument was being used in the course of defendant's prison duties. There was no need for defendant to pick up the instrument since he could have informed the prison authorities of its presence. To permit the defense that an inmate was in possession of a proscribed instrument on the basis that it was being delivered to the prison authorities would open the door to fabricated defenses and would in essence defeat the purpose of the statute. Accordingly, we conclude that the trial court acted properly in refusing the proferred testimony.
Defendant also claims that certain remarks of the trial judge indicate that he was so biased against inmates of prisons *75 as to be disqualified under Code of Civil Procedure section 170, subdivision 5. The remarks complained of are as follows: "That cannot be, that cannot be, because the ingenuity of prisoners  of course, those that have been there longer than this young man  is something unbelievable to those who do not know about them. And if this be so, then you might  if what you say is true you might as well take this statute right out of the books because everyone in possession of an instrument is going to be bringing it to an officer. About a hundred percent will do that. And then you've got  then you'd have to give instructions about do you have a reasonable doubt whether or not he was bringing it to the officer. No, no, I think it's  the section as written, it's purposely dominion and control. If they pick it up and take it somewhere, in my opinion that's it."
[3] The foregoing remarks do not reveal any prejudice directed personally against defendant (see People v. Sweet, 19 Cal. App.2d 392, 396 [65 P.2d 899]; People ex rel. Dept. of Public Works v. McCullough, 100 Cal. App.2d 101, 110-111 [223 P.2d 37]), but merely amount to comment by the court as to the proper interpretation of section 4502 and the untoward results of the interpretation urged by defendant. [4] Furthermore, grounds of disqualification under Code of Civil Procedure section 170, subdivision 5 must be raised at the earliest practicable opportunity after discovery of the disqualifying facts. (Oak Grove School Dist. v. City Title Ins. Co., 217 Cal. App.2d 678, 703 [32 Cal. Rptr. 288]; People v. Pratt, 205 Cal. App.2d 838, 844 [23 Cal. Rptr. 469]; People v. Wade, 150 Cal. App.2d 281, 285 [309 P.2d 841].) Here defendant neither objected at trial to the judge's remarks nor filed an affidavit of bias and prejudice as provided in Code of Civil Procedure section 170, subdivision 5. He is therefore precluded from claiming bias on the instant appeal.
The judgment is affirmed.
Sims, J., and Elkington, J., concurred.
Appellant's petition for a hearing by the Supreme Court was denied April 10, 1968.
NOTES
[1]  Unless otherwise indicated, all statutory references are to the Penal Code.
